this script is supposed to make a part's can collide to false when a specific player touches it, but it does not work, it makes the can collide true anyways, please let me know what is wrong.
local idk = {}
game.Players.PlayerAdded:Connect(function(plr)
if plr:GetRoleInGroup(******) == "Scripter" or "Builder" or "Owner" then
table.insert(idk, plr)
script.Parent.Touched:Connect(function(h)
for _, player in pairs(idk) do
if player then
script.Parent.CanCollide = false
wait(.5)
script.Parent.CanCollide = true
end
end
end)
end
end)

2 comments
btw you know you can just copy and paste the script
??