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

How to move a Gui with TweenPosition?

Hello, I've made this script where I try to move Gui's by using tweenposition, and someone has told me I needed to use PlayerGui for this, so I did. But the script still won't work, can anyone help?



local Player = game.Players.LocalPlayer
local SG = Player:WaitForChild("PlayerGui")
local Cs = SG.CutScenes



game.Workspace.ButtonOne.Touched:Connect(function()

Cs.UpperFrame:TweenPosition(UDim2.new(0,0,0,-35), "Out", "Quad", 1) 
Cs.LowerFrame:TweenPosition(UDim2.new(0, 0,0.793, 0),  "Out", "Quad", 1)
wait(6.25)
Cs.TransPArencyFrame:TweenPosition(UDim2.new(0,0,0,0), "Out", "Quad", 1)
wait(1.6)
Cs.TransPArencyFrame:TweenPosition(UDim2.new(0,0,1,0), "Out", "Quad", 1)
wait(0.8)
Cs.UpperFrame:TweenPosition(UDim2.new(0,0,0,-150), "Out", "Quad", 1)
Cs.LowerFrame:TweenPosition(UDim2.new(0,0,1,0), "Out", "Quad", 1)
wait(1.1)
script:Destroy()
end)

By the way, the script is a localscript

2 comments

0

try using remote events, because i think the problem is that it is a local script, but you can't really change that.. im not an expert but i think thats the problem

0

try using remote events, because i think the problem is that it is a local script, but you can't really change that.. im not an expert but i think thats the problem

1 answer

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