Before you say "Test it!" or something, I can't because I am on a laptop that does not support ROBLOX Studio.
local Player = game.Players.LocalPlayer local FadeFrame = Player.PlayerGui.TeleportGui.FadeFrame local Button = script.Parent --[Gui visible Teleport to SpawnTeleportPart Gui Invisible]-- function onClick() wait(0.5) FadeFrame.Visible = true wait(1) Player.Character.Torso.CFrame = game.Workspace.ImportantItems.SpawnTeleportPart.CFrame wait(1) FadeFrame.Visible = false end Button.MouseButton1Click:connect(onClick)
Yes, that would work but this is a revised and upgraded version I cooked up for you.
Button.MouseButton1Down:connect(function() wait(0.5) FadeFrame.BackgroundTransparency = 1 FadeFrame.Visible = true for i = 1,10 do FadeFrame.BackgroundTransparency = FadeFrame.BackgroundTransparency - 0.1 wait() end Player.Character.Torso.CFrame = game.Workspace.ImportantItems.SpawnTeleportPart.CFrame wait() for i = 1,10 do FadeFrame.BackgroundTransparency = FadeFrame.BackgroundTransparency + 0.1 wait() end FadeFrame.Visible = false end)