#I'm having trouble making the player's speed go to 25 and the player slowly losing health
76 messages · Page 1 of 1 (latest)
does it need to be stopable?
script.Parent.MouseClick:Connect(function(plr)
local h = plr.Character.Humanoid
h.WalkSpeed = 25
while task.Wait(5) do
h.Health -= 5
end
end)
oh wait its capital wait
oh yeah, I typed wait with capital on accident
I'm getting to used to just typing half of everything and pressing tab so it autofills
hey
** You are now Level 3! **
how do i make it so
you cannot just spam click it
@old kindle
man fuck that shit
@old kindle
just add in a debounce with cooldown
no?
that would disable it
from making other people
be able to use it
what if i fire a remote event
and in a local script
it disables the click detector
locally
or just run it multithreaded
you know what, next time watch your mouth and somebody may actually help you
If I'm not wrong instead of 1, write -1
And task.wait(x amount of seconds) after reducing the health because it will do it as fast as possible if you don't add it
In the for loop
crims
do you know
how i would prevent
people
from spam clicking
it
once they already clicked it
and it needs to be local
so other people can still click it
If you disable it in a localscript it will be disabled for that player, hence the name localscript
Add a denounce
Debounce
bro
i dont know
what debounce is
would this work
daddy drop the addy
like maddy try send me the addy
local debounce = false
script.Parent.MouseButton1Click:Connect(function())
if debounce then return end
debounce = true
-- Do stuff here
debounce = false
end
That's a debounce
You can replace the word debounce with active to make it make sense for yourself maybe
If active, return
you racist mf
?
Who