Hey guys- Today I am trying to get an objects position and store it within a value that belongs specifically to a player. It sounds easy and it probably is but I just can't figure out why its not working out for me. Here's the local script.
local plyr = game.Players.LocalPlayer.Character local shipposition = game.Workspace[Shipsname.Value].BodyKit.Grok.Position print(shipposition) -- This gives me the correct value plyr.Shipsposition.Value = shipposition game.Workspace[Shipsname.Value]:Destroy()
When I run the script the shipposition variable works just fine and it prints out the desired position without any errors but if I were to print out the Shipsposition value it would give me 0. I'll be happy to clarify on anything if I can, but thanks! lordrex12345
If you're trying to print the value of Shipsposition before line 4, it won't work because the value wasn't set.