I have the script, the Mouse.Button1Down
is fine. I want to make it like when the player shoots the barrel goes back then forward. I have a Barrel, a BarrelRecoil (where should the barrel go) and a BarrelRecoilBack (the barrels original position) inside the weapon. I tried to use...
Barrel.Position = BarrelRecoil.Position wait(0.2) Barrel.Position = BarrelRecoilBack.Position
...but that has a weird - laggy looking. I also tried...
local fnsh = BarrelRecoil.CFrame local strt = BarrelRecoilBack.CFrame for process = 0, 101, 15 do Barrel.CFrame = strt:Lerp(fnsh, process) wait() end
...this didnt work too (No error code). What should I use?