I am trying to make a part move if they click a part named "Bell". It is not working. Inside the part that I want moved it has a BodyGyro, BodyPosition, and this script:
bp = script.Parent.BodyPosition if game.Workspace.Door.DoorBell.Bell.Transparency == 0.5 then script.Parent.BodyPosition.Position = Vector3.new(bp.x-20, bp.y, bp.z) end
Your problem is that x, y and z are not valid properties of BodyPosition
. I think you meant to say:
local bp = script.Parent.BodyPosition if game.Workspace.Door.DoorBell.Bell.Transparency == 0.5 then bp.Position = Vector3.new(bp.Position.x-20, bp.Position.y, bp.Position.z) end