What I want it to do is that if a player has their right arm off they can go through the door and people that have their right arm can't go through the door. Help me see what I am doing wrong.
local part = script.Parent function onTouch(hit) local Player = hit.Parent if Player['Right Arm'] == nil then part.CanCollide = false end end part.Touched:connect(onTouch)
Try findfirstchild
local part = script.Parent function onTouch(hit) local Player = hit.Parent if Player:FindFirstChild("Right Arm") == nil then part.CanCollide = false end end part.Touched:connect(onTouch)
FindFirstChild returns nil if not found.