function onTouched(hit)
local hit = hit.Parent:FindFirstChild("Humanoid")
if hit then
print("function suppose")
script.Parent.Transparency=1
script.Parent.CanCollide = false
wait(7)
script.Parent.Transparency=0
script.Parent.CanCollide = true
wait(5)
end
end
script.Parent.Touched:Connect(onTouched)
what your toughts about limited force on parts and semi anchored, about this issue.
local delay = 4
function onTouched(hit)
local hit = hit.Parent:FindFirstChild("Humanoid")
script.Parent.Transparency = if hit then 1 else 0
script.Parent.CanCollide = hit == nil
task.wait(delay)
end
script.Parent.Touched:Connect(onTouched)
local delay = 4
function onTouched(hit)
local hit = hit.Parent:FindFirstChild("Humanoid")
script.Parent.Transparency = if hit then 1 else 0
script.Parent.CanCollide = hit == nil
task.wait(delay)
end
local PartFolder = --path to parts
for i,v in pairs(PartFolder:GetChildren()) do
if v:IsA("BasePart") then
v.Touched:Connect(onTouched)
end
end