Everytime I join my game to test out my Camera position that I’m trying to implement I recieve an error
Character is not a valid member of Players “Players”, I’m not sure what I did wrong there but here’s the code.
local Players = game:GetService("Players")
local Character = Players.Character or Players.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local PlayButton = script.Parent.ImageButton
local Frame = script.Parent.Frame
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.GameFolder.CameraFolder.CameraPart.CFrame
PlayButton.MouseButton1Click:Connect(function()
Camera.CameraType = Enum.CameraType.Custom
PlayButton:Destroy()
Frame:Destroy()
end)
What did I do wrong here?