I am trying to make a gui teleporter for my game and it just won't work The System I Have Uses Blocks Called Teleport1.
Player = game.Players.LocalPlayer
BlackScreen = script.Parent.Parent.BlackScreen
TeleportButton1 = script.Parent.TeleportButton1
Spawn3 = game.Workspace.Teleport3
Spawn1 = game.Workspace.Teleport1
HasPressedTeleport = false
function TeleportPlayer()
if HasPressedTeleport == false then
BlackScreen.Transparency = 1
wait(0.1)
BlackScreen.Transparency = 0.9
wait(0.1)
BlackScreen.Transparency = 0.8
wait(0.1)
BlackScreen.Transparency = 0.7
wait(0.1)
BlackScreen.Transparency = 0.6
wait(0.1)
BlackScreen.Transparency = 0.5
wait(0.1)
BlackScreen.Transparency = 0.4
wait(0.1)
BlackScreen.Transparency = 0.3
wait(0.1)
BlackScreen.Transparency = 0.2
wait(0.1)
BlackScreen.Transparency = 0.1
wait(0.1)
BlackScreen.Transparency = 0
wait(0.1)
Player.Character:MoveTo(Spawn1.Position)
wait(0.1)
BlackScreen.Transparency = 0
wait(0.1)
BlackScreen.Transparency = 0.1
wait(0.1)
BlackScreen.Transparency = 0.2
wait(0.1)
BlackScreen.Transparency = 0.3
wait(0.1)
BlackScreen.Transparency = 0.4
wait(0.1)
BlackScreen.Transparency = 0.5
wait(0.1)
BlackScreen.Transparency = 0.6
wait(0.1)
BlackScreen.Transparency = 0.7
wait(0.1)
BlackScreen.Transparency = 0.8
wait(0.1)
BlackScreen.Transparency = 0.9
wait(0.1)
BlackScreen.Transparency = 1
end
end
TeleportButton1.MouseButton1Down:connect(TeleportPlayer)
Not Trying To Be Greedy But I Would Appreciate It If Someone Could Help Me In The Next Month Or So,

1 comment
Kind of unrelated but you can use TweenService for your transparency animation