How to raise player camera in roblox studio

PLEASE HELP. I need to know how to manipulate the camera or what tutorial you give me to be able to manipulate it… I want the camera to rise when a tool (pistol) is activated to simulate the force of the shot, please contribute whatever

1 Like

Here’s a link for a relatively good source regarding manipulating the camera.

1 Like

Thank you very much for the contribution, but it is not exactly what I was looking for. Rather, could you tell me how I would do it so that when I fire the mouse icon it rises and after milliseconds it returns to its place

edit: it is like to simulate the pressure that the weapon makes when firing

1 Like

What do you mean by “fire the mouse icon”?

1 Like

As I said, I am making a weapons system which I want when the player fires the weapon… the camera rises a bit, changing its position and after milliseconds it returns to its previous position

1 Like

Assuming it’s a tool and I understood what you meant, this is what you would need to do,

script.Parent.Activated:Connect(function() -- localscript in the tool, on click will activate
	local camera = workspace.Camera -- getting the camera
	
	local tween_service = game:GetService("TweenService") -- calling tweenservice
	local tween_info = TweenInfo.new(0.03, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, true) -- end boolean lets us set reverse it back, 0.03 is the duration of the tween
	
	tween_service:Create(camera, tween_info, {CFrame = camera.CFrame * CFrame.new(0, 0.5, 0)}):Play() -- makes it briefly go up, I set it as 0.5, and due to tween_info will return back to its original position
end)
1 Like

I didn’t really ask for a script but thank you very much for your help I didn’t know for the world that I had to use TweenService thank you very much

1 Like

There’s a variety of ways you could have gone about it but I believe the easiest and most optimal way is TweenService, glad I could help! :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.