I don’t know How do I make recoil
this is my gun without any recoil
https://streamable.com/75nivt
thanks for help.
I don’t know How do I make recoil
this is my gun without any recoil
https://streamable.com/75nivt
thanks for help.
Are you looking for recoil patterns?
So… you wanted the camera to shake when the gun fired?
If you are talking about camera shake sort of type when you are aiming, this is an example.
Camera.CFrame = Camera.CFrame * CFrame.Angles(0,math.rad(1),0)
You should use function check() and be sure if you have “Recoil” value so then:
if script.Parent.Recoil.Value > 3 then
script.Parent.Recoil.Value = script.Parent.Recoil.Value - 1
elseif script.Parent.Recoil.Value <= 3 then
script.Parent.Recoil.Value = 3
end
end
plus function cap()
function cap()
if script.Parent.Recoil.Value > 10 then
script.Parent.Recoil.Value = 10
end
end
It doesn’t work
this is localscript
local camera = game.Workspace.CurrentCamera
Tool.Activated:Connect(function(mouse)
camera.CFrame = camera.CFrame * CFrame.Angles(0,math.rad(1),0)
end)
thank you for your reply, I want a camera recoil
thank you for your reply, yes I want like this
This may not be the best solution, but in a character there’s something called a humanoid. CameraOffset is a property of a humanoid and by changing the Vector3 values randomly you can easily create a camera shake.
Heres a script that may or may not been from a free model that violently shakes the screen:
local player = game.Players.LocalPlayer
local char = player.Character
for i = 1, 10 do
char.Humanoid.CameraOffset = Vector3.new(math.random(-3, 3), math.random(-3, 3), math.random(-3, 3))
wait()
end
char.Humanoid.CameraOffset = Vector3.new(0, 0, 0)
Hope this helps, god bless!
If you’re looking for recoil patterns and camera shake take a look at Recoil Implementations - #4 by ChickenBagelz
Can you help me? I will be add you in roblox studio
I already try it but it don’t work
the cap() function isn’t recommended by me. math.clamp() is better
Yes, I want recoil pattern! Please give me it