So... I have this script that has to run when a specific part touches the brick it's in. But I'm unsure if I have to put "hit.Name" or "hit.Parent.Name" in line 3.
Can someone help me out with this?
function onTouched(hit)
game.Workspace.Coll2.CanCollide = true
if hit.Parent.Name == "DoNotTouch" then
workspace.Ring.BodyAngularVelocity.AngularVelocity = Vector3.new(0,0,0)
workspace.DoorsMain2Open.Script.Disabled = false
workspace.BarsOpen.Script.Disabled = false
workspace.ClickMAIN.ClickDetector.MaxActivationDistance = 32]]
script.Disabled = true
end
end
script.Parent.Touched:connect(onTouched)
