Why is this not teleporting players? The Stage is a string value.
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
wait(5.1)
if player.leaderstats.Stage == "1" then
character.Torso.CFrame = CFrame.new(Vector3.new(-235.2, 6018.7, 140))
end
end)
end)
end)
My LeaderBoard script:
game.Players.ChildAdded:connect(function(newPlayer)
wait(.5)
newPlayer.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=42584068&placeId=0"
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local stage = Instance.new("StringValue")
stage.Name = "Stage"
stage.Value = "Tutorial"
stage.Parent = stats
stats.Parent = newPlayer
newPlayer.Character.Humanoid.WalkSpeed = 0
wait(15)
newPlayer:LoadCharacter()
end)
Other script:
script.Parent.Touched:connect(function(part)
local t = part.Parent:FindFirstChild("Torso")
local h = part.Parent:FindFirstChild("Humanoid")
local plyr = game.Players:GetPlayerFromCharacter(h.Parent)
if t and h then
t.CFrame = CFrame.new(-235.2, 6018.7, 140)
plyr.leaderstats.Stage.Value = "1"
end
end)

2 comments
It says leaderstats is not a valid member of "Player" in the output so the script isn't working. I have a script that adds a leaderboard. I can add the leaderboard script.
Hello, this script doesn't work.