Does anyone know a function that triggers when a play joins the game? I have code that will run properly if it happens, and I’ve been using RunService.RenderStepped, but but it seems to wait a second before triggering, which means the player’s camera isn’t automatically set. This happens locally (On the client), so I don’t think PlayerAdded will work.
local userInputService = game:GetService("UserInputService")
userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.Keyboard then
local function updateCameraCFRAME()
game.Workspace.CurrentCamera.CFrame = game.Workspace.CameraPart.CFrame
end
game:GetService("RunService").RenderStepped:Connect(updateCameraCFRAME)
end
end)
EDIT: Originally was needing help setting camera but I have that figured out and I need a subsitute for RunService.RenderStepped