I’m making a camera death effect, and want to have the camera track the player from a fixed angle.
So far it works, but after the player respawns the camera stays in the same position, is there anyway for me to check when they respawn in the context of this script without remote events?
Script:
task.wait()
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local hrp = char:WaitForChild("HumanoidRootPart")
local cam = workspace.CurrentCamera
hum.Died:Connect(function()
game:GetService("RunService").RenderStepped:Connect(function()
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = CFrame.lookAt(cam.CFrame.Position, hrp.Position)
end)
task.wait(1)
script.Reverse:Play()
task.wait(1.2)
script.Parent.Black.BackgroundTransparency = 0
end)
In my original response I specifically stated that I wanted to avoid using remote events, as I want this to all be handled on the client, but I guess I might have no choice
This script should also be placed inside the StarterCharacterScripts container if you want it to execute each time a player’s character is added/loaded. This should also circumvent the ‘RemoteEvent’ object dependence.