Do you guys know why when i run a script, it doesn't do as it's supposed to but when i do in the inspector, it works?

45 Views Asked by At

Im making a gun pickup script, but when carrying the gun i don't want it to move from the guncontainer so i constrained its position, but when i run the script, it shows it as constrained in the inspector, but still moves. Afterwards when i try the same thing except i do it "physicly" only using the inspecter to check on the constrains, it works... help

1

There are 1 best solutions below

2
On

you need to check that your gun container is also constrained, because if that moves the gun will also move.