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

Why isn´t my Gui Moving To the Position?

So, im trying to make kind of an intro to my game with a gui, but it isn't moving and idk why. Here's my script:

local player = game.Players.LocalPlayer
local clone = game.ReplicatedStorage.StartGui:Clone()
clone.Parent = player.PlayerGui
player.PlayerGui.ScreenGui.TextLabel.Castle:TweenPosition(UDim2.new(0.33, 0, 0.237, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce)

Help?

1 comment

0

for starters, the one in replicated storage is named"StartGui" and you are looking for"ScreenGui" in the playergui 

1 answer

You're cloning the GUI to the wrong location. The GUI should be parented under ScreenGUI not next to it (assuming that StartGui is something other than a ScreenGUI):

local player = game.Players.LocalPlayer
local clone = game.ReplicatedStorage.StartGui:Clone()
clone.Parent = player.PlayerGui.ScreenGui -- First fix
player.PlayerGui.ScreenGui.StartGui.TextLabel.Castle:TweenPosition(UDim2.new(0.33, 0, 0.237, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce) -- Second fix

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