I am trying to make a camera for a start screen in my game, I had successfully made it work the night before but today its not working, the error message says that the part for the camera of the start screen isn't a valid member of workspace. I've tried rewriting the script and I triple checked it all to make sure it was correct but it still didn't work. can someone help me?
This is the script btw
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Camera = workspace.CurrentCamera local TextLabel = script.Parent.CREDITS local PlayButton = script.Parent.PLAY
repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable Camera.CFrame = workspace.CameraPart.CFrame
PlayButton.MouseButton1Click:Connect(function() Camera.CameraType = Enum.CameraType.Custom PlayButton:Destroy() TextLabel:Destroy() end)
can you put a code blocker in it? Then I will try to solve your problem.