Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need my script to Tween a frames position after a time that is set, whats wrong?

My code for making this frame tween to a new position after 10 seconds wont work, whats wrong with it?

wait(10)


game.StarterGui.LoadingScreen.Frame.Frame:TweenPosition(UDim2.new(0.845, 0, 0.45, 0))

1 answer

What you need to understand is what starter gui is. When a player spawns, whatever is in startergui gets put into their "PlayerGui"... If I understand correctly, you want to move the frame 10 seconds after they spawn. In that case, the code would look like this:

--This is a LOCAL script under StarterGui. If  the gui is only there when the player FIRST enters the game, put this in StarterPlayer scripts
wait(10)
game.Players.LocalPlayer.PlayerGui:WaitForChild("LodingScreen"):WaitForChild("Frame"):WaitForChild("Frame"):TweenPosition(UDim2.new(0.845, 0, 0.45, 0))

1 comment

0

Didnt work

This discussion is preserved as it was. New answers, comments, and votes are closed.