Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a custom recoil script?

Asked by 4 years ago
Edited 4 years ago

I need to be able to fix this script to make my own type of simplified recoil for my tool any help?

local plr1 = script.Parent.Parent
--// Shoot
    plr1:FindFirstChild("Humanoid").CameraOffset = (2.5, 1, 0)
    wait(0.1)
    plr1:FindFirstChild("Humanoid").CameraOffset = (2.5, 0, 0)

Obviously there is more code but I don't want to leak my entire script.

The "(2.5, 1, 0)" first comma in that string is an error here is what I get from the error(Output)

03:25:24.343 - Workspace.Tool.ServerMain:28: Expected ')' (to close '(' at column 49), got ','

If anyone can help with fixing it THAT WOULD BE VERY GUD!! For now I'll have to be "Commenting" out the code which sucks.

Edit: I forgot to mention that its 2.5 offset because I have a script that force shift locks ONLY when the tool is equipped. (Doesn't matter just if your wondering)

Answer this question