#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)

old kindle
#

this increases the health

thin summit
#

what

#

how do i decrease health then

old kindle
#

does it need to be stopable?

thin summit
#

no

#

it just decreases your health

#

by 5

#

every 5 seconds

#

until you die

old kindle
#
while true do h.Health -= 1 end
#

oh hang on

#
while task.Wait(5) do
  h.Health -= 5
end
thin summit
#
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

old kindle
#

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

thin summit
#

hey

dusk grottoBOT
#

studio** You are now Level 3! **studio

thin summit
#

how do i make it so

#

you cannot just spam click it

#

@old kindle

#

man fuck that shit

#

@old kindle

old kindle
thin summit
#

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

old kindle
#

or just run it multithreaded

thin summit
#

waht

#

bastard

#

wait a minutee

old kindle
#

you know what, next time watch your mouth and somebody may actually help you

proper rivet
#

If I'm not wrong instead of 1, write -1

thin summit
#

-crys-

#

;((

proper rivet
#

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

thin summit
#

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

proper rivet
#

If you disable it in a localscript it will be disabled for that player, hence the name localscript

#

Add a denounce

#

Debounce

thin summit
#

bro

#

i dont know

#

what debounce is

#

would this work

#

daddy drop the addy

#

like maddy try send me the addy

proper rivet
#
local debounce = false

script.Parent.MouseButton1Click:Connect(function())
     if debounce then return end
     debounce = true

     -- Do stuff here

     debounce = false
end
thin summit
#

busy a right then a left for the ally

#

like day you aint look to be shabby

proper rivet
#

That's a debounce

#

You can replace the word debounce with active to make it make sense for yourself maybe

#

If active, return

thin summit
#

you racist mf

proper rivet
#

?

thin summit
#

you said N

#

racist mf

proper rivet
#

Who

thin summit
#

How is my anti-afk menu

#

hey guys

#

im attemping to set the nil value of true to false but the local plr

#

doesnt function in user datastore