-
What do you want to achieve? A part that disables collision 2 seconds after you touch another part, and then a cooldown before you can walk-thru it again and repeat the cycle
-
What is the issue? I’ve searched around and didn’t exactly find what i was looking for
-
What solutions have you tried so far? Mentioned above, i’ve looked for a forum-post that has the same question, to no avail.
idk wdym by walkthrough but if it’s about freezing the player for 2 seconds then uses this script
local part = script.Parent
local debounce = false
part.Touched:Connect(function(hit)
if not debounce then
debounce = true
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.WalkSpeed = 0
hit.Parent.Humanoid.JumpPower = 0
hit.Parent.AutoRotate = false
task.wait(2)
hit.Parent.Humanoid.WalkSpeed = 16.2
hit.Parent.Humanoid.JumpPower = 50
hit.Parent.AutoRotate = true
end
task.wait()
debounce = false
end
end)
you know that you can change the way how you interact with a part, you can either walk thru it or not, basically collision
This can be achieved through collision groups. If you want a part which, when touched, ceases another parts collisions entirely, you can use getchildren which you will need all of them parented to. Or collectionservice, which doesn’t require this. I don’t advise using getdescendants.
could you give an example script maybe? I’m not that good at scripting but learning
script.Parent.Touched:Once(function(hit)
for _,v in workspace.Folder:GetChildren() do
v.CanCollide = false
v.CanQuery = false
v.CanTouch = false
end
end)
If you want it to run only once, keep Once, or replace with Connect. Though you should add a debounce if you are going to do so. Add a task.wait after altering the properties to reset them back.
it’s going to be repeated every time it’s touched
That’s why I added Once instead of Connect
the thing is, there should be a cooldown before there’s no collision again, like. 1 minute
local Debounce
script.Parent.Touched:Connect(function(hit)
if not Debounce then Debounce = true
print(“init”)
for _,v in workspace.Folder:GetChildren() do
v.CanCollide = false
v.CanQuery = false
v.CanTouch = false
end
task.wait(10)
print(“over”)
for _,v in workspace.Folder:GetChildren() do
v.CanCollide = true
v.CanQuery = true
Debounce = nil
end
end
end)
Probably works. I just stacked a bunch of parts and they just fall out of map lol
the part still has no collision, even when i touched it
local Debounce
script.Parent.Touched:Connect(function(hit)
if not Debounce then Debounce = true
print(“init”)
for _,v in workspace.Folder:GetChildren() do
v.BrickColor = BrickColor.new(“Cocoa”)
v.CanCollide = false
v.CanQuery = false
v.CanTouch = false
end
task.wait(10)
print(“over”)
for _,v in workspace.Folder:GetChildren() do
v.BrickColor = BrickColor.new(“Forest green”)
v.CanCollide = true
v.CanQuery = true
Debounce = nil
end
end
end)
It goes back to collideable after 10s
retouch to go back to uncollideable
it sadly doesn’t work, i don’t know what i did wrong
Mind showing a screenshot of the folder?

The part that should get collision after touching and a few seconds is called “Part”, and is in no folder
Ok. GetChildren won’t work in that case