I want the player’s camera to be at their character instantly but when I use the Custom CameraType to make their camera automatically go to their character I have encountered this very annoying problem where it automatically tweens the camera while it goes there and glitches out for a bit too, this is all done by Roblox, below is an example of what I’m talking about:
As you can see in the GIF Roblox automatically smoothly tweens the camera when I select the Custom CameraType and my character glitches during it too and I don’t know what to do about it so is there any solutions to this?
It’s a local script, I have also tried to get around this by manually setting their camera’s CFrame to be the HumanoidRootPart’s CFrame so it can go instantly to the player but unfortunately that didn’t work either…
That’s all I have tried to fix this problem, I seriously need help with this problem because it’s very annoying and it glitches the camera for a bit, any help is appreciated.
Hello!
Make you sure you using local script and do this?
repeat
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
until game.Workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable
game.Workspace.CurrentCamera.CFrame = workspace.Part.CFrame
-- Part for undo this action is
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
Turning the cameratype to scriptable makes you fully control your camera with the script you are using, if you set it to custom you won’t be able to control it properly as it is overriding with the default camera scripts.
I still don’t understand how that will fix my problem thought, I’m not trying to make custom adjustments to their camera but instead I’m just simply trying to remove the annoying automatic Roblox smooth tween that happens if you set their CameraType to Custom.
I don’t have a tween that does this it’s Roblox doing it so if I set their CameraType to Scriptable their camera will break and if I set it to Custom back then it will still glitch out and do the automatic smooth tween again which is done by Roblox and not me so what I have done is basically useless…
When I set my camera type to custom I do not have a tween going on, and as I can see from your video, when you click the button the tween plays to the part and your character seems to have moved there too so it is not Roblox doing anything here as far as I know.
By the way, where is your local script parented to?
Roblox is don’t making any changed for tween or camera type change
Probably you got some camera script already that’s is breaking your script
Local script should be parented to the StarterGui
Also try debugging it like
This can help you if some of your script changes a CurrentCamera Property if yes try find that script
You can find it easily with pressing Ctrl+shift+f and search “CurrentCamera” That will show you all scripts that is working with Camera
If I’m correct I assume you’re dealing with the camera smoothing that roblox does while the “Custom” CameraType is set. Try something like this:
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable --Allows full control of the camera
workspace.CurrentCamera.CFrame = CFrame.new(0, 0, 0) --Put your CFrame here
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom --Put it back to normal
If your camera is already set to “Scriptable” kind of like what you have in your video then do something like this to instantly reset it’s CFrame to wherever the character is:
I have tried all of the solutions above but nothing worked, I have tried to fix it on my own by adding a wait() after the teleportation and then manually setting their CameraType to Custom and then I got this result which is way better than before:
This still breaks the camera for a second but it’s still way better than before, if I don’t find a solution then I will find my way around how I could make it a bit better but I still need help on fixing this.
plrCharacter is a reference to the player’s character in the Workspace, I don’t think that you knowing how I teleport them will change anything thought, the problem will most likely still remain, other than that code there’s nothing that I think is causing this.
I just want to know how to remove the automatic smooth tweening that is done by Roblox when you set their CameraType to Custom like I said in the post.