Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make the camera position itself in front of the person and not be able to move it?

So I want the player to not be able to look around with the camera unfortunately I don't really know how to do this. I am relatively new to coding and I know I have been asking a lot of questions so I am sorry about that.

Please Reply

Thanks

1 answer

✓ Accepted answer

Set the camera every frame with RenderStepped from RunService, then simply disconnect the events.

local Connection = {}
Connection[1] = game:GetService("RunService").RenderStepped:Connect(function()
	workspace.CurrentCamera.CFrame = CFrame.new(--[[your pos & angle]])
end)

--However you want to stop the cam force
--eg with mouse click
Connection[2] = game.Players.LocalPlayer:GetMouse().Button1Down:Connect(function()
	Connection[1]:Disconnect()
	Connection[2]:Disconnect()
end)

3 comments

0

could setting the CameraType to Fixed be another way of doing this?

0

no, but you can position the camera with the block

0

Ok can you answer the question for me by doing that

This discussion is preserved as it was. New answers, comments, and votes are closed.