i asked a question before about this, i made a script but it wont work :/ the gui is in starter gui and the script is as follow:
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.Button1Down:connect(function() game.StarterGui.Load.Enabled = true game.StarterGui.Load.Frame.TextButton.Bar.Size = UDim2.new(.99,0,1,0, "Out", "Linear",5) wait() end)
i want it so the player has to be HOLDING down the left mouse key in order for the gui to go up, like in mining simulator but it wont work. this script is in a local script
You would want something like this:
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() Mouse.Button1Down:connect(function() game.StarterGui.Load.Enabled = true game.StarterGui.Load.Frame.TextButton.Bar:TweenSize(UDim2.new(.99,0,1,0), "Out", "Linear",5) wait() end) Mouse.Button1Up:connect(function() game.StarterGui.Load.Frame.TextButton.Bar:TweenSize(UDim2.new(0,0,0,0), "Out", "Linear",0.01, true) game.StarterGui.Load.Enabled = false wait() end)
You seemed to be mistaken when it came to tweensize, UDim2 does not have the parameters that you put into the UDim2. I added a true to the second tweensize so that it overrides the original tweensize when you stop holding your left click down.
Hopefully this helps you out.