Im trying to make a simple mana system where mana goes down when a key is pressed. (It's key press because all of the moves a key presses) But mine doesn't work with key presses so whats the fastest way to do that? If you need to see my script tell me.
Might need to see the script. Try using a keydown event that sets a value letting the script know it's still pressed and adding a loop that checks that value and does the code until the key is released. Example:
local Player = game.Players.LocalPlayer local keypressed = false local mouse = Player:GetMouse() local mana = 10000 function keypress() mana = mana-1 wait(0.1) if keypressed then keypress() end end mouse.KeyDown:connect(function(key) if key == "q" then keypressed = true keypress() end end) mouse.KeyUp:connect(function(key) if key == "q" then keypressed = false end end)