#how to make a area that heals all players inside of it?
1 messages · Page 1 of 1 (latest)
** You are now Level 6! **
make a big part Non-Collidable and check wehn a player Touches/Untouches the Part if they touch it make them heal, if they untouch it stop the heal
tried this and noticed that if player moves whilst inside the area it'll duplicate them 3 or 4 times
add a debounce
track it if hes inside or outside
: what if multiple players walk inside at the same time 🤔
table with debounces
or just like
table with the key being the player id
local peopleinregion = {}
part.touched bla bla
table.insert(peopleinregion,player)
part untouched
table.remove(peopleinregion,player)
while task.wait(1) do
for _.v in peopleinregion do
heal
end
pseudocode
probably because you didn't use debounce properly
the character is made up of multiple parts, each part can individually trigger .touched
check if alr in it btw
kk
could use zonesplus module instead which does all the hard stuff for you
also kinda depends if the area can move
maybe even add another loop which checks if people are still inside cause Untouched isn't really trustworthy sometimes
its reliable ;o
or check before every heal
I don't trust it
that's probably just from your experiences connecting to it poorly
its fine if you use it properly
how does connecting to it poorly look like?
Ok
same way as op
op?
no debounce etc
yeah go figure, if you use something wrong, it doesn't work properly, i know, shocker.
oh thats what you mean
if you add a debounce to untouch wouldn't that just mean you can untouch -> touch -> untouch it fast to go around it 😭?
who'dve thought if you don't use it properly it doesn't work properly. truly an insight that needed to be said
different kind of debounce bruh
how would that look like
if you were putting a classic / newbie debounce in touchended i mean that's probably why touchended didnt work for you
I just explained why that would be bad why should I have done that
u can make a a part of the airspace, and a part when they exit. when they join the game, disable the built in roblox healing system, when they are in the airspace, enable it, when they touch the exit, disable it
alr i changed my mind, maybe it is trustworthy
getpartsinpart
This was helpful, zone plus was easy to learn how to use and to use altogether, will most definently make making anything from now way easier