I made a script that's supposed to clone a small garden that is in ReplicatedStorage and place it on the player (That part isn't in the shown script). I want it to be when the garden is touched if they are not the player that made it then they take damage, and if they are then they get healed. Everything works correctly except the script will only affect one person at at time. So for example if the creator is in it getting healed and another player is inside it the creator will still get healed but the other player wont be detected. How do I allow it to detect both all players touching it at once.
GardenO.Touched:Connect(function(Hit) local Humanoid = Hit.Parent:FindFirstChild("Humanoid") if Humanoid == nil then return end if Humanoid.Parent == Character then if deb == true then return end deb = true AlreadyTouched = true print("Local Humanoid Touched") Humanoid.Health = Humanoid.Health + 10 print ("Healed " ..Humanoid.Name.. " Once") wait(1) Humanoid.Health = Humanoid.Health + 10 print("Healed " ..Humanoid.Name.. " Twice") wait(1) Humanoid.Health = Humanoid.Health + 10 print("Healed " ..Humanoid.Name.. " Three Times") wait(1) Humanoid.Health = Humanoid.Health + 10 print("Healed " ..Humanoid.Name.. " Four Times") wait(1) Humanoid.Health = Humanoid.Health + 10 print("Healed " ..Humanoid.Name.. " Five Times") else if deb == true then return end deb = true Humanoid.Health = Humanoid.Health - 10 print ("Hurt " ..Humanoid.Name.. " Once") wait(1) Humanoid.Health = Humanoid.Health - 10 print("Hurt " ..Humanoid.Name.. " Twice") wait(1) Humanoid.Health = Humanoid.Health - 10 print("Hurt " ..Humanoid.Name.. " Three Times") wait(1) Humanoid.Health = Humanoid.Health - 10 print("Hurt " ..Humanoid.Name.. " Four Times") wait(1) Humanoid.Health = Humanoid.Health - 10 print("Hurt " ..Humanoid.Name.. " Five Times") end wait(5) GardenO:Destroy() deb = false end) wait(0.2) Debounce = false end)