That’s because MouseButton1Down will only fire once, you can use a while loop to keep going when it first goes down, and stop once MouseButton1Up is fired.
That’s not what I said? You’re going to need to make a while loop to change the power while the button is down. MouseButton1Down is an event, and will only be fired as soon as the mouse goes down… It will not be repeated until the user stops clicking, and clicks again.
You’ll need a while loop to fire while the MouseButton1 is down.
Like this
local tool = script.Parent
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
mouseDown = false
mouse.Button1Down:connect(function()
mouseDown = true
end)
mouse.Button1Up:connect(function()
mouseDown = false
end)
while true do
wait()
if mouseDown then
print("do something while mouse is down")
end
end
StarterGui is a place holder for developers to hold GUI that should be cloned to players when they join. Any scripts that edit a GUI in StarterGui will not update for players.