So I have this area system and when you have enough rebirths you can go to the next area and removes the GUI. But right now it removes the GUI but you still get teleported back to spawn.
Here's the script!
script.Parent.Touched:Connect(function(hit)
local debounce = false
if hit:IsA("BasePart") then
if game.Players:FindFirstChild(hit.Parent.Name)["leaderstats"].Rebirths.Value >= 2 then
debounce = false
else if game.Players:FindFirstChild(hit.Parent.Name)["leaderstats"].Rebirths.Value <= 1 then
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Head.CFrame = CFrame.new(game.Workspace.SpawnTP.Position)
end
end
end
end
end)

6 comments
elseif*
Still doing it
what do u mean teleported back to spawn
i have a teleport system where if you dont have enough you get teleported back i think the issue is that its not realizing the rebirths changed
are u changing the rebirth values from the client or server
also use game.Players:GetPlayerFromCharacter(hit.Parent) instead of :FindFirstChild(hit.Parent.Name) in an if statement