How to fix character being transparent?

I didn’t really know which category to put this in, so if this category is wrong I will take down the post and move it to the correct category.

Hey guys, I am making a game that uses a standing still camera that is away from the character. I ran into an issue where when I play I can see through the character’s body parts as if I were zoomed in.
Screenshot_454
I have been fiddling with camera settings and cannot really seem to figure out how to fix this. Does anyone know why this is happening or how to fix it?

EDIT: It only seems to happen with certain characters, I changed to a character with a package and the effect stopped.
Screenshot_455

2 Likes

What’s your Occlusion Mode set to?

My occlusion mode is set to zoom.

Consider changing the player’s MaxZoomDistance and MinZoomDistance to a number like 10 for more info check this

I tried that but it didn’t work…

What all did you make to camera, can you send here the code?

I just have a localscript in StarterGui with this code:

local Player = game.Players.LocalPlayer
local Camera = workspace.CurrentCamera
local Character = Player.Character or Player.CharacterAdded:Wait()

repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable until
	Camera.CameraType == Enum.CameraType.Scriptable
	Camera.CFrame = workspace.Camera1.CFrame

Do you have any other scripts in game? Like a script to lock first person or third person.

Nope. Just that one to change the camera.

Consider using this code instead

local Player = game.Players.LocalPlayer
local Camera = workspace.CurrentCamera
local Character = Player.Character or Player.CharacterAdded:Wait()

	Camera.CameraType = Enum.CameraType.Scriptable
game:GetService("Run Service").RenderStepped:Connect(function()
	if Camera.CameraType == Enum.CameraType.Scriptable then
	      Camera.CFrame = workspace.Camera1.CFrame
       end
end)

I did that, but now my camera isn’t positioned at the camerapart at all.
Screenshot_456

EDIT: You also put a space in between run and service, but I fixed that.

Uh, is the camera part in the right position? If it’s like that it surely got moved.

No, I can move my camera around and see the camerapart in the same position.
Screenshot_457

1 Like

Try this instead:

local Camera = workspace.CurrentCamera
local Character = Player.Character or Player.CharacterAdded:Wait()

	Camera.CameraType = Enum.CameraType.Scriptable
	      Camera.CFrame = workspace.Camera1.CFrame

That wouldn’t work, you haven’t defined the player variable.
EDIT: Even with the player variable defined, it still is having the same problem.
Screenshot_458

Ops, my error, use that code but define the player variable.

So you are able to rotate the camera around the NPC?

Yeah, just as if i were just sitting in a chair regularly.

I’ll fix ur code.

local Player = game.Players.LocalPlayer
local Camera = workspace.CurrentCamera
local Character = Player.Character or Player.CharacterAdded:Wait()

Camera.CameraType = Enum.CameraType.Scriptable
game:GetService("Run Service").RenderStepped:Connect(function()
    Camera.CameraSubject = nil
	Camera.CFrame = workspace.Camera1.CFrame
end
1 Like

Thanks, it works like a charm now.

1 Like