Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Open(plr)
- local Owner = script.Parent.Parent.Owner.Value
- if Owner == plr.Name then
- if script.Parent.CanCollide == true then
- script.Parent.Transparency = 1
- script.Parent.CanCollide = false
- for _, i in pairs(script.Parent:GetChildren()) do
- if i.ClassName == "Decal" or i.ClassName == "Texture" then
- i.Transparency = 1
- end
- end
- else
- script.Parent.Transparency = 0
- script.Parent.CanCollide = true
- for _, i in pairs(script.Parent:GetChildren()) do
- if i.ClassName == "Decal" or i.ClassName == "Texture" then
- i.Transparency = 0
- end
- end
- end
- end
- end
- script.Parent.ClickDetector.MouseClick:Connect(Open)
Advertisement
Add Comment
Please, Sign In to add comment