I'm trying to make a script where a brick connected under the train hits a single brick (not grouped whatsoever) on the track named "TripCock", it'll turn the vehicleseat in the train the color red.
When ever the brick on the track comes into contact with the brick under the train, the seat stays the same color and does not change.
function onTouched(touch) if touch.Parent.Name == "TripCock" then script.Parent.Parent.Parent.Parent.Parent.R46ACar.Body.Part.BrickColor = BrickColor.Red() end end script.Parent.Touched:connect(onTouched)
Note: All the "parents" in the script are correct, also "part" is the vehicleseat name