script.Parent.Triggered:Connect(function(player)
local char = player.Character
if player.leaderstats:WaitForChild("Rebirths").Value >= script.Parent.Parent.Parent.Price.Value then
script.Disabled = true
script.Parent.Enabled = false
player.PlayerGui.FX.TextLabel.Visible = true
player.PlayerGui.FX.Circle:TweenSize(UDim2.new(0, 0,2.5, 0))
wait(1)
char.Head.CFrame = CFrame.new(game.Workspace:WaitForChild("50000").Position)
wait(1)
player.PlayerGui.FX.Circle:TweenSize(UDim2.new(1.5, 0,2.5, 0))
script.Disabled = false
script.Parent.Enabled = true
player.PlayerGui.FX.TextLabel.Visible = false
else
player.PlayerGui.MainUI.Error.Visible = true
wait(1)
player.PlayerGui.MainUI.Error.Visible = false
end
end)
This is my code for teleporting a player to a block (named 50000) if it touches a teleportion block (and it has only 0 rebirth) what I am trying to do is that it will only teleport if a intvalue is 1. How would I do that?
Thanks.

1 comment
What's your problem and what part it didn't expect to work?