hi,
I’m trying to make a sensor that when a part touches it, it will change some properties of the surroundings like a signal change.
For some reason, the script doesn’t work at all.
((It is only supposed to work if a part called “Part” touches it.)
Thank you!
Horse
Script below.
script.Parent.Touched:connect(function(P)
if P.Parent.Name == "Part" then
script.Parent.Parent.Red.Material = "Neon"
script.Parent.Parent.Red.Transparency = 0
script.Parent.Parent.one.Material = "Plastic"
script.Parent.Parent.one.Transparency = 0.95
script.Parent.Parent.two.Material = "Plastic"
script.Parent.Parent.two.Transparency = 0.95
script.Parent.Parent.Green.Material = "Plastic"
script.Parent.Parent.Green.Transparency = 0.95
script.Parent.Material = "Neon"
script.Parent.Parent.lime.Material = "Plastic"
script.Parent.Parent.yellow.Material = "Plastic"
script.Parent.Parent.double.Material = "Plastic"
script.Parent.Parent.SPAD.a.CanCollide = true
script.Parent.Parent.SPAD.b.CanCollide = true
script.Parent.Parent.SPAD.c.CanCollide = true
script.Parent.Parent.SPAD.d.CanCollide = true
end
end)