Ayuda en Scirpt

Bueno chicos soy daniel y estoy necesitando ayuda con mis script, aclaro que no soy un scripter soy un constructor y este script lo he sacado de Youtube, el cual es script solo me funciona en el studio pero en el jeugo por roblox no funciona, el script trata de un sistema de check point.

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)

y tambien esta este

function ot(hit)
if hit.Parent ~= nil then
local player = game.Players:playerFromCharacter(hit.Parent)
if player ~= nil then
if player.leaderstats.Stage.Value == script.Parent.Name - 1 then
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
if h.Health ~= 0 then
player.leaderstats.Stage.Value = script.Parent.Name
end 
end 
end 
end 
end 
end


script.Parent.Touched:connect(ot)

me ayudaria su opinion y solucion lo mas antes posible

Can you pass me the script already fixed please