Save Player Position Script Donot Work?
Asked by
6 years ago Edited 6 years ago
Hello im making a game with tons of adventures and quest. I have everything i need but for some reason the save position script does not work.The script is supposed to say that is saves their position and if they rejoin game theyll be at the position they was at last.
03 | local DataStore = game:GetService( "DataStoreService" ):GetDataStore( "test" ) |
05 | game.Players.PlayerAdded:connect( function (plr) |
08 | local lastPos = char.HumanoidRootPart.Position |
11 | DataStore:SetAsync( "last" , tostring (lastPos)) |
14 | game.Players.LocalPlayer.Character:MoveTo(lastPos) |
PLEASE HELP!