I was working on a FPS game and I tried to make a aim down sights script but it won't work and a bubble says that my animator isn't initialized I can't fix it. Can someone help?
pragma strict
function update () (
if(Input. GetMouseButtonDown (1))
(
transform. localPosition = Vector3(0, 0, 0);
)
if(Input. GetMouseButtonUp (1))
(
transform. localPosition = Vector3(0.416, -0.472, 0.892);
)
↧