
1.1k Views
483 Executions
Auto delete invisible barrier
Universal Script 📌
styear100K executions
7 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Auto delete → deletes normal transparent parts Pass-through → transparent parts in Model/Folder can be walked through Ignore mesh → MeshPart / SpecialMesh not affected Auto detect → new parts in workspace are processed automatically
local function setNoCollide(p)
p.CanCollide=false
p.CanTouch=false
p.CanQuery=false
end
local function isMeshPart(p)
return p:IsA("MeshPart") or p:FindFirstChildOfClass("SpecialMesh")
end
local function process(v)
if v:IsA("BasePart") and not isMeshPart(v) then
if v.Transparency>=1 then
if v.Parent and (v.Parent:IsA("Model") or v.Parent:IsA("Folder")) then
setNoCollide(v)
else
v:Destroy()
end
end
end
end
for _,v in ipairs(workspace:GetDescendants()) do
process(v)
end
workspace.DescendantAdded:Connect(process)
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!
