Camera not working

  1. What do you want to achieve? I wanna make it so that the camera to be fixed and not bug out

  2. What is the issue? the camera bugs out whenever I die

  3. What solutions have you tried so far? I tried stuff to fix it!!!

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		if plr.UserId == 547000629 then
			local mm = plr.Character
			local as = mm.Animate:Clone()
			local devskin = game.ReplicatedStorage.DevSkins.garello:Clone()
			devskin.Parent = workspace
			devskin:MakeJoints()
			devskin:MoveTo(char.PrimaryPart.Position)
			plr.Character = devskin
			mm.Archivable = true
			mm:Destroy()
			as.Parent = devskin

			devskin:WaitForChild("Humanoid").Died:Connect(function()
				wait(5)
				plr:LoadCharacter()
			end)

			for _, Script in pairs(game.StarterPlayer.StarterCharacterScripts:GetChildren()) do
				local ScriptClone = Script:Clone()
				ScriptClone.Parent = devskin
			end
		end
	end)
end)

2 Likes

please answer ive been trying to fix this forever

1 Like

please answer i still need to fix .-.

please answer :((((((((((((

tiky

Not sure if this will fix it entirely, but replace it with this:

devskin:WaitForChild("Humanoid").Died:Connect(function()
	wait(5)
    workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
	plr:LoadCharacter()
end)

Change the currentcamera back to normal, you should also include the script where the camera type is changed on death. lmk if theres anything wrong with the script

1 Like

where would i put this in the script exactly??

Put this in the same script, I do recommend that you edit camera related things under the client as doing this on the server is replicated (if I recall correctly), while doing it in the client doesn’t replicate. You can do this by firing a remote event.

I know to put it in the script but like talking about like where do I actually put it, like in the middle of the script or in line 10 or at the end? Also im really not much of a scripter so I really dont know how to do what you guys are talking about?

nvm i know where to put it but it doesnt fix :face_with_head_bandage:

pelase heelp i need fix
(writing something so people cna seee))

I highly suggest you read about remote events to learn Server-Client relationships so that you can achieve this. You can read about it here: Bindable Events and Functions | Roblox Creator Documentation

When the event is fired, have the camera controls be done on the client.