Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do fix my gui because its not tweening?

Asked by 8 years ago
local ShopGui = game.StarterGui.ShopUI.ShopGui


script.Parent.MouseButton1Click:connect(function()
ShopGui:TweenPosition(UDim2.new(0.15,0,0.0023,0), 'Out', 'Sine', .7)
end)

I've tried countless times modifying this but it doesn't seem to work

0
what is the script's parent? LisaF854 93 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

A few things I need to know.

  • Is this a local script? If Filtering Enabled is set to true the click function would not be connected.
  • On top of this, you are manipulating the gui in the actual StarterGui rather then the local players PlayerGui.

Try


local Player = game:GetService('Players').LocalPlayer local UIService = Player:WaitForChild('PlayerGui') local ShopGui = UIService.ShopUI.ShopGui script.Parent.MouseButton1Click:connect(function() ShopGui:TweenPosition(UDim2.new(0.15,0,0.0023,0), 'Out', 'Sine', .7) end)

:: Run this from a Local Script.

Ad

Answer this question