For the past months I been trying to fix a bug, where in my obby I play with certain players and each time I die it spawns me at the lobby then it takes like 5-10 seconds to respawn back to the checkpoint I am really Here is a small video of what I mean https://youtu.be/iLGI_TOoM6I Anybody who can fix the checkpoints it prevents me to have growth of players in this obby because of this bug please help me... I been trying fix it for months legit here is the script of the checkpoints they all have the same script;
local spawn = script.Parent
spawn.Touched:connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local checkpointData = game.ServerStorage:FindFirstChild("CheckpointData")
if not checkpointData then
checkpointData = Instance.new("Model", game.ServerStorage)
checkpointData.Name = "CheckpointData"
end
local checkpoint = checkpointData:FindFirstChild(tostring(player.userId))
if not checkpoint then
checkpoint = Instance.new("ObjectValue", checkpointData)
checkpoint.Name = tostring(player.userId)
player.CharacterAdded:connect(function(character)
wait()
character:WaitForChild("HumanoidRootPart").CFrame = game.ServerStorage.CheckpointData[tostring(player.userId)].Value.CFrame + Vector3.new(0, 4, 0)
end)
end
checkpoint.Value = spawn
end
end)

2 comments
Can you give me steps what to do how to use this REVISED script because I read what you typed and I understood why but for some reason I dont know how to put it correctly, however When I used this REVISED script I tried putting it on many ways of u said like server storage etc, can you give steps to what to do when im in the studio because every object of a checkpoint has the same script inside
I think you have to put it in the ServerScriptService or in the Checkpoint blocks/parts