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

How would you make a block disappear when a player holds down there mouse button?

Asked by 6 years ago

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?

0
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 secretboy6 68 — 6y
0
@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 cruizer_snowman 117 — 6y
View all comments (2 more)
0
Player Gui, sir DeceptiveCaster 3761 — 6y
0
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) DeceptiveCaster 3761 — 6y

Answer this question