local players = game:GetService("Players") function touched(otherPart) local partParent = otherPart.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if humanoid then script.Parent.Size = script.Parent.Size + Vector3.new(1,1,1) --The size it will grow once touched end end script.Parent.Touched:Connect(touched)
i would be happy if you could explain where the debounce should be and how to add it
Hopefully, this explains it
The if statement can't run unless the debounce is set to false and when it's set to false it sets it to true so you can only run it once every 1-second example you can change this in line 4 hopefully, that explained it you can read more about it here if my explanation was a bit bad :D https://developer.roblox.com/en-us/articles/Debounce
local players = game:GetService("Players") local Debounce = false local CoolDown = 1 -- your cooldown on the debounce in seconds function touched(otherPart) if Debounce == false then -- so if the debounce is set to false then we set it to true meaning that the if statement cant run without the debounce being false if that makes sense Debounce = true local partParent = otherPart.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if humanoid then script.Parent.Size = script.Parent.Size + Vector3.new(1,1,1) --The size it will grow once touched end wait(CoolDown) end end script.Parent.Touched:Connect(touched)