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.
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.)
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:
- You can use a particle effect parented to the HumanoidRootPart and set the enabled to true in a script when you want the player to “explode”.
- For making the player invisible, check this out: How to make player invisible? - #3 by hestolemyrice
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.
why would I want players stepping over an invisible body though?
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
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
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
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
I believe the camera type would be orbital, but might also be track.
https://developer.roblox.com/en-us/api-reference/enum/CameraType
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.
No, I still want it to be as if your camera is the same when your guy invisible and can’t collide with
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
Yes, that is exactly what I want! What’s the code btw? I’ll solution it!
wait, I thought anchoring the humanoid root part doesn’t make you respawn? That’s what I tried doing
I don’t know how your code/game is set up, I used a blank baseplate and it works fine.
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?
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?
I think I just realized, I have to manually respawn them with :LoadCharacter instead of rely on Roblox’s broken respawn system
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’.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.