Basically what I’m trying to do is when a character is added, It checks if a value is above one, then it will teleport the player, But it didn’t work with no errors. I tried removing the wait, It didn’t work. And i tried using a while loop but it did everything else except teleport the player?
local plr = game.Players.LocalPlayer
local BaguetteEaten = plr:WaitForChild("BaguetteEaten")
local char = plr.Character or plr.CharacterAdded:Wait()
local Root = char:WaitForChild("HumanoidRootPart")
local LT = plr.PlayerGui.DialogGui.Baguette3
plr.CharacterAdded:Connect(function()
if plr:WaitForChild("BaguetteEaten").Value == 1 then
wait(7)
Root.CFrame = game.Workspace.CFrames.BaggueteDied.CFrame
wait(1)
LT.TextTransparency = 0
LT.Text = "So"
wait()
LT.Text = "So y"
wait()
LT.Text = "So yo"
wait()
LT.Text = "So you"
wait()
LT.Text = "So you a"
wait()
LT.Text = "So you al"
wait()
LT.Text = "So you als"
wait()
LT.Text = "So you also"
wait()
LT.Text = "So you also a"
wait()
LT.Text = "So you also at"
wait()
LT.Text = "So you also ate"
wait()
LT.Text = "So you also ate t"
wait()
LT.Text = "So you also ate th"
wait()
LT.Text = "So you also ate the"
wait()
LT.Text = "So you also ate the b"
wait()
LT.Text = "So you also ate the ba"
wait()
LT.Text = "So you also ate the bag"
wait()
LT.Text = "So you also ate the bagu"
wait()
LT.Text = "So you also ate the bague"
wait()
LT.Text = "So you also ate the baguet"
wait()
LT.Text = "So you also ate the baguett"
wait()
LT.Text = "So you also ate the baguette"
wait()
LT.Text = "So you also ate the baguette?"
wait(2)
LT.TextTransparency = 0
end
end)