Save a player's respawn location when they touch a checkpoint.
-- Checkpoint System local checkpoint = script.Parent local debounces = {} checkpoint.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if not player or debounces[player.UserId] then return end debounces[player.UserId] = true if player.RespawnLocation ~= checkpoint then player.RespawnLocation = checkpoint local orig = checkpoint.Color checkpoint.Color = Color3.fromRGB(80, 227, 164) task.wait(0.4) checkpoint.Color = orig end task.wait(1) debounces[player.UserId] = nil end)