Void on mouse down if statements not working,Voidonmousedown

Basically I’m making a game where you can click and drag objects if they haven’t been placed yet but it isn’t quite working my code has voidonmousedown then if placed = false then move the building and I have the same thing for voidonmousedrag but it doesn’t seem to work please help!!


“OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider.”

Do your Buildings have a collider component attached to them?
If not add one and try again.