script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local torso = hit.Parent.Torso local plr = game.Players:GetPlayerFromCharacter(hit.Parent) local gui = game.ServerStorage.fadeEffect:clone() gui.Parent = plr.PlayerGui local frame = gui.Frame frame.Transparency = 0.2 wait(.1) frame.Transparency = 0.4 wait(.1) frame.Transparency = .6 wait(.1) frame.Transparency = .8 wait(.1) frame.Transparency = 1 torso.CFrame = game.Workspace.teleportShopReciever.CFrame wait(.1) frame.Transparency = .8 wait(.1) frame.Transparency = .6 wait(.1) frame.Transparency = .4 wait(.1) frame.Transparency = .2 wait(.1) gui:Remove() end end)
Also if someone could tell me how to do this faster, instead of writing "wait(.1)" every time, that'd also be really helpful, thanks in advance!
EDIT: Forgot to add that this teleports the player immediately, instead of even trying to process the gui
Responding to your second question...
local countup = 0 while (countup <1.2) do countup = countup+0.2 end
local countdown = 1 while (countdown >0) do countdown = countdown-0.2 end
you made the player teleport imedietly before processing gui