So i was wondering how you could make it so that when your holding down your left mouse button key on a part, a gui would pop up and slowly fill a bar, kind of like in mining simulator or treasure hunting simulator. after the bar is complete, the block would disappear and add a X amount into a value in the players leaderstats. Any idea on how to do this?
COMMUNITY QUESTION
How would you make a block disappear when a player holds down there mouse button?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
http://wiki.roblox.com/index.php?title=API:Class/Mouse/Button1Down
Incorporate Tweening into that and you've got yourself the GUI. Then make it so that when the GUI hits a specific size -- or after the mouse button is down for a period of time -- the block disappears and the value of X increases
http://wiki.roblox.com/index.php?title=GUI_Animations ;)
@secretboy6 it wont work, here is my script: 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) end) -- it is in a local script
Player Gui, sir
it would be game.Players.LocalPlayer.PlayerGui.Load.Enabled = true and game.Players.LocalPlayer.PlayerGui.Load.Frame.TextButton.Bar.Size = UDim2.new(.99,0,1,0, "Out", "Linear", 5)