so if I teleport to "Island1" first, I can teleport to "Island1" again, but I can't teleport to "Island2" after I teleport to "Island1", same goes for the other way around...
local island1 = script.Parent:FindFirstChild("1")
local island2 = script.Parent:FindFirstChild("2")
local player = script.Parent.Parent.Parent.Parent
local teleport = player:FindFirstChild("SS").Teleport
local d = false
local c = false
island1.MouseButton1Down:Connect(function()
if d == false then
d = true
if teleport.Value >= 0 then
player.Character:FindFirstChild("Torso").CFrame = game.Workspace.Island1.CFrame
for i = 30,0,-1 do
island1.Text = i
wait(1)
if i <= 0 then
d = false
end
end
end
end
end)
island2.MouseButton1Down:Connect(function()
if c == false then
c = true
if teleport.Value >= 1 then
player.Character:FindFirstChild("Torso").CFrame = game.Workspace.Island2.CFrame
for i = 30,0,-1 do
island2.Text = i
wait(1)
if i <= 0 then
c = false
end
end
end
end
end)

2 comments
Your indentation is a bit of a mess here.
At least its somewhat readable