It says
Players.ninjafox56.PlayerGui.Shop.ShopGui.LightSide.ChooseSideL:5:尝试比较数字
Rank = game.Players.LocalPlayer.leaderstats.Rank
Power = game.Players.LocalPlayer.leaderstats.Power
if Power >= 10000 then
Rank.Value = 'Light'
else
script.Parent.Text = 'Not Enough Power'
wait(3)
script.Parent.Text = 'Light Side'
end
end)
Since Power
是里面的一个对象leaderstats
,我假设这是一个数值 https://developer.roblox.com/en-us/api-reference/class/NumberValue.
当你说
if Power >= 10000 then
您正在比较 NumberValueInstance https://developer.roblox.com/en-us/api-reference/class/Instance反对这个数字。您没有比较里面存储的数字Power
到数字,这就是你的错误来自的地方。要解决此问题,请使用NumberValue 的值 https://developer.roblox.com/en-us/api-reference/property/NumberValue/Value在比较中:
if Power.Value >= 10000 then
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)