**What do you want to achieve?
I want to achieve checkpoints that when touched it saves the players location my idea is when a player touches a new checkpoint each time it saves the player’s location on death and when they leave the game
What is the issue? Include screenshots / videos if possible!
I have not found a way to implement my current method into a datastore where it could be saved
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
The solutions I have tried are serialization but I’m not sure how to include that in a datastore I have tried looking up many tutorials on serialization but only found one on the dev forum and by the end, I was confused on how to put it into a datastore. Tried a tutorial on Youtube it partially worked for the first checkpoint but then it failed to change checkpoints when placing a second one. Does Anyone Have a better solution for checkpoints that save when touched?
local Players = game:GetService("Players")
workspace.Pos.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local Player = Players[hit.Parent.Name]
Player.RespawnLocation = workspace.Pos
end
end)
Players.PlayerAdded:Connect(function(Player)
Player.RespawnLocation = workspace.Spawn
end)
This will change the player’s SpawnLocation.
To save it, it depends on how you want to do it, with name, instance, etc.