I tried to make a script that touching a part of a model will set the all the parts in the model to become transparent. I tried using
function onTouched(hit) script.Parent.Parent.Door.A1.Transparency= 1 script.Parent.Parent.Door.A2.Transparency= 1 script.Parent.Parent.Door.A3.Transparency= 1 script.Parent.Parent.Door.A4.Transparency= 1 end script.Parent.Touched:connect(onTouched)
but it wouldn't any help will be appreciated
Thanks,
Exsius
EDITED: The below script should work:
script.Parent.Touched:connect(function(t) -- Anonymous functions. for _, v in pairs(game:GetService("Workspace").Door:GetChildren()) do v.Transparency = 1 end end)