The teleport only works at certain times. Sometimes, when I join the game, one of the teleports work (while the other one doesn't), sometimes, it's vice-versa. And even sometimes, when both are working, the script seems to break and stop functioning. It outputs no error. Why's this?
The script is the same for both teleports, but the position is different. One is 'Out' the other one is 'In' in line 10.
view source
local debounce = false
script.Parent.Touched:Connect(function(hit)
if debounce == false then
debounce = true
if hit.Parent:FindFirstChild('Humanoid') then
local p = workspace[hit.Parent.Name]
local plr = game.Players:GetPlayerFromCharacter(p)
if plr.Stats.Level.Value >= 10 then
hit.Parent:MoveTo(game.Workspace['Boss Entrances'].DesertEntrance['Teleports'].Out.position)
print('teleported req')
wait(4)
debounce = false
end
end
end
end)

1 comment
Thank you!