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

how do fix my gui because its not tweening?

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

1 comment

0

what is the script's parent?

1 answer

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.

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