Tween not playing

I want to make it so that when a button is pressed, a TextLabel pops up, and then after 2 or 3 seconds a LoadingGUI pops up and the player is teleported to another place. For some reason, the first part works, but the other part (where the LoadingGUI fades in) won’t work. I’ve tried basically all I thought could’ve been a solution, but failed everytime. I also didn’t find any forum posts on this topic.

Here is the script:

local plr = game.Players.LocalPlayer
local intro_gui = game.ReplicatedStorage:WaitForChild("event_intro_gui")
local tp_text = plr.PlayerGui:WaitForChild("event_tp_confirmation_gui").tp_text
local TS = game:GetService("TweenService")
local TI_loading = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local TI_tptext = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)

script.Parent.MouseButton1Down:Connect(function()
	TS:Create(tp_text, TI_tptext, {BackgroundTransparency = 0}):Play()
	TS:Create(tp_text, TI_tptext, {TextTransparency = 0}):Play()
	TS:Create(tp_text.text_stroke, TI_tptext, {Transparency = 0}):Play()
	TS:Create(tp_text.border_stroke, TI_tptext, {Transparency = 0.5}):Play()
	task.wait(2)
	TS:Create(intro_gui.intro_frame, TI_loading, {BackgroundTransparency = 0}):Play()
	TS:Create(intro_gui.intro_frame.title, TI_loading, {TextTransparency = 0}):Play()
	TS:Create(intro_gui.intro_frame.entering, TI_loading, {TextTransparency = 0}):Play()
	task.wait(3)
	game:GetService("TeleportService"):Teleport(129406271462843, plr, {}, intro_gui)
end)

Before you ask, I made sure all the Instances’ properties supposed to be Tweened ARE SET TO VISIBLE and their, for example, BackgroundTransparency is Tweened while the Frame is Visible. There are no errors and the player does get teleported (I saw it in the Console, it prints out the failed teleport thing in studio)

Any recommendations would be appreciated!

2 Likes

Pretty sure you cant teleport players via client-side

edit: I just looked it up and I am wrong

3 Likes

I found the problem, it was because I didn’t move the intro_gui from ReplicatedStorage to the PlayerGui :person_facepalming:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.