Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is a number value coming up as an object?

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

2 comments

0

Please post the entire script. [Player] hasn't been defined.

0

Also, describe what you're attempting to create.

1 answer

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.