【发布时间】:2021-08-29 11:48:53
【问题描述】:
我试图让玩家的最大变焦距离更多地取决于他们拥有的力量(力量),因为力量越大,角色越大。
但我收到了上述错误:
尝试使用“CameraMaxZoomDistance”索引 nil
这是我的代码:
hum:WaitForChild("BodyDepthScale").Value = .5 + (powr.Value / 250)
hum:WaitForChild("BodyHeightScale").Value = .5 + (powr.Value / 250)
hum:WaitForChild("BodyWidthScale").Value = .5 + (powr.Value / 250)
hum:WaitForChild("HeadScale").Value = .5 + (powr.Value / 250)
if powr.Value > 1000 then
game:GetService("Players").LocalPlayer.CameraMaxZoomDistance = powr.Value / 50
end
if powr.Value > 200 then
print('higher')
hum.MaxHealth = powr.Value / 2
end
【问题讨论】: