#CHECKPOINT SYSTEN
6 messages · Page 1 of 1 (latest)
ok sad
sad
Show your code???
local checkpoint = script.Parent
checkpoint.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
if not player:FindFirstChild("leaderstats") then
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local checkpointStat = Instance.new("IntValue")
checkpointStat.Name = "Checkpoint"
checkpointStat.Value = 1
checkpointStat.Parent = leaderstats
end
local checkpointStat = player.leaderstats.Checkpoint
local checkpointID = checkpoint:FindFirstChild("CheckpointID")
if checkpointID and checkpointStat.Value ~= checkpointID.Value then
checkpointStat.Value = checkpointID.Value
end
end
end)
so sad