Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How come this teleports me but doesn't show the gui?

Asked by
Leyssia 25
8 years ago
Edited 8 years ago

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

2 answers

Log in to vote
1
Answered by 8 years ago
Edited 8 years ago

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

http://wiki.roblox.com/index.php?title=Loops

0
Mind rating me up? TheRealJ3ffrey 5 — 8y
0
Cant, dont have 5 rep Leyssia 25 — 8y
0
Ok, thank anyway TheRealJ3ffrey 5 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

you made the player teleport imedietly before processing gui

0
Could you elaborate? Tell me where the mistake is? Leyssia 25 — 8y
0
your getting the gui 1/2 of a sec either before or after the teleport GimmeWaffleBruh 18 — 8y

Answer this question