Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is a number value coming up as an object?

Asked by 7 years ago

game.Players[Player].Stats.Wood.Value = game.Players[Player].Stats.WoodOld.Value is giving Workspace.Tree.Handler:25: bad argument #2 to '?' (string expected, got Object)

Wood and WoodOld are both a IntValue

Thanks

0
Please post the entire script. [Player] hasn't been defined. Wiscript 622 — 7y
0
Also, describe what you're attempting to create. Wiscript 622 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago

You mean?

game.Players[Player].Stats.Wood.Value = game.Players[Player].Stats.WoodOld.Value

I suggest to you to use:

game.Players.LocalPlayer.Stats.Wood.Value = game.Players.LocalPlayer.Stats.WoodOld.Value
Ad

Answer this question