How do I freeze the player's camera?

It would set the camera to one position, but this can easily be changed. Try adding random numbers and adding it to the position.
Here’s a good tutorial.

2 Likes

Seeing that RenderStepped changes it every frame, the ‘camera flickering’ would be barely seen, let alone seen at all. So it wouldn’t shake. (this is going off of a camera rotation setting trick with RenderStepped so I think it’s fine.)

1 Like

Based on the title alone:
You can set the camera type to fixed or scripted, that freezes the players camera. You might want to make the camera is face something, this can be done with CFrames. If you want the transition to be smooth, you can use TweenService. Here is a page by Roblox on camera manipulation: Camera Manipulation

Based on the info in the post:

Based on the video:
The only difference I see is that the camera shakes and fades with a white UI frame. The UI thing can be done by tweening the transparency of a white frame in and out.

1 Like

why would I want players stepping over an invisible body though?

1 Like

also, that method is inefficient since it won’t be orbiting around the humanoid root part. It’d be weird if their camera wasn’t fixed to something and just a floating camera

1 Like

hold on I just realized something. I think that video did the method you listed. So I might be able to implement that! Edit: Never mind

1 Like

I don’t exactly understand. Wouldn’t setting the camera every frame be worse than setting it one time? Not to mention the potential lag it would make.

Anyways:
In the video, the camera type doesn’t seem to be changed at all. I, as said in my reply, was going off of the title alone in that section of my reply. I believe the game to be using this as it is the most popular one I could find: EZ Camera Shake ported to Roblox

1 Like

I’m not looking for a camera shake effect, just the camera locking

Edit: Locking the camera meaning it will still pretend there’s a character in that spot

1 Like

I believe the camera type would be orbital, but might also be track.
https://developer.roblox.com/en-us/api-reference/enum/CameraType

1 Like

You can set your CameraType to Scriptable and then set the camera CFrame to whatever position you want.

local HumanoidRootPart = game.Players.LocalPlayer.Character.HumanoidRootPart;
local Camera = workspace.CurrentCamera;
Camera.CameraType = "Scriptable";
Camera.CFrame = HumanoidRootPart.CFrame * CFrame.new(0, 0, -10) * CFrame.Angles(0, math.rad(180), 0);

This code would lock the camera as it’s set to scriptable and then would place it in front of the character.

2 Likes

No, I still want it to be as if your camera is the same when your guy invisible and can’t collide with

1 Like

Okay, I wrote a short code. Is this the effect you’re trying to obtain? Well, besides the shaking and particles.
https://gyazo.com/36a567b0fd3300afbaa527151a15a4a3

2 Likes

Yes, that is exactly what I want! What’s the code btw? I’ll solution it!

1 Like

wait, I thought anchoring the humanoid root part doesn’t make you respawn? That’s what I tried doing

2 Likes

I don’t know how your code/game is set up, I used a blank baseplate and it works fine.

2 Likes

so, I just tried it, and it doesn’t let me respawn. I just did a basic humanoid.Died event, and anchored their humpart. But can you send the code please?

1 Like

I sent you the code already. There’s nothing else, it’s really simple. I don’t know why it’s not respawning you. Does it respawn you if your HumanoidRootPart is unanchored?

2 Likes

I think I just realized, I have to manually respawn them with :LoadCharacter instead of rely on Roblox’s broken respawn system

1 Like

That’s much better than leaving automatic respawning on. I always turn off CharacterAutoLoads in my games as I prefer writing my own respawn system rather than using Roblox’.

3 Likes

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