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

Camera Glitch, help?

I have a glitch where the the screen either turns black or all I see is the skybox. This never happened to me before and I don't know how to fix it. This is a script I used to fix it but the player has to know to click that button so it can be fixed. Also, when clicked, he player teleports to 0,0,0 which I don't want to happen!


script.Parent.MouseButton1Click:connect(function()
workspace.CurrentCamera:Destroy()
workspace.CameraSubject = script.Parent.Parent.Parent.Parent.Character.Humanoid
workspace.CameraMode = "Custom"
end)

Is there another way to fix this without having the player click a button, or this is the only way to fix it?

1 comment

0

It would be very helpful if you can give us the cause of the problem in the first place. Providing your fix is not useful to us.

1 answer

Destroying the camera is possibly the error. Also on line 3 and 4, you never mentioned the CurrentCamera. So, what I suggest:

-- Local Script
script.Parent.MouseButton1Click:connect(function()
	game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoide
	game.Workspace.CameraMode = "Custom"
end)

1 comment

0

The script in the OP is the fix to the problem. "Is there another way to fix this without having the player click a button, or this is the only way to fix it?"

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