Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- X-ray vision: see through everything!
- local function makeXRayPart(part)
- -- LocalTransparencyModifier will make parts see-through but only for the local
- -- client, and it won't replicate to the server
- part.LocalTransparencyModifier = .3
- end
- -- This function uses recursion to search for parts in the game
- local function recurseForParts(object)
- -- Did we find a part that isn't
- if object:IsA("BasePart") then
- makeXRayPart(object)
- end
- -- Stop if this object has a Humanoid - we don't want to see-through players!
- if object:FindFirstChildOfClass("Humanoid") then return end
- -- Check the object's children for more parts
- for _, child in pairs(object:GetChildren()) do
- recurseForParts(child)
- end
- end
- recurseForParts(workspace)
Add Comment
Please, Sign In to add comment