I've been trying to make a camera manipulation script- but for some reason, it's not working for player.Added

local player = game.Players.LocalPlayer
local endpart = game.Workspace.endpart
local character = player.Character or player.CharacterAdded:Wait()
if character then
    print("start")
local cam = workspace.CurrentCamera
local focuspart = game.Workspace.focuspart
cam.CameraType = "Fixed" 
cam.Focus = focuspart.CFrame
end

This script does not work with * if character then*, but however it works with wait()

5 comments

0

First of all; is this a local script or a server script?

0

Localscript

0

Instead of player.CharacterAdded:Wait(), go player.CharacterAdded:Wait(1)

0

Still to no avail.

0

It all works fine, when I use a wait(), but when I use characterAdded or playerAdded it doesn't work at all