#What You Need
FilteringEnabled is stipping you from doing what you want to do.. You're going to have to either setup a RemoteEvent to do this for you, or do everything on the client.
##RemoteEvent Option
Place a RemoteEvent in ReplicatedStorage, use FireClient on the server, and OnClientEvent on the client. Do any camera manipulation on the client.
Script in ServerScriptStorage;
local death = game.ReplicatedStorage.Died
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild('Humanoid').Died:connect(function()
death:FireClient(player)
end)
end)
end)
LocalScript in StarterPack;
local player = game.Players.LocalPlayer
local re = game.ReplicatedStorage.Died
re.OnClientEvent:Connect(function()
player.CameraMode = "Classic"
end)
##Client-Sided Option
If you do everything on the client, there's no need to setup a RemoteEvent. Place a LocalScript in StarterPack;
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
hum.Died:Connect(function()
player.CameraMode = "Classic"
end)
3 comments
by the way, the camera mode is currently set on LockFirstPerson
you can simply put a local script in StarterCharacterScripts to reset the camera on the players death.
how would i do that?