Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Part is not a valid member of workspace?

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)

1 comment

0

Make sure that your CameraPart is anchored if it is cancollide false. This error could be caused by the fact that it is falling out of the world space or you might just not have a part named "CameraPart" in your workspace.

1 answer

can you put a code blocker in it? Then I will try to solve your problem.

This discussion is preserved as it was. New answers, comments, and votes are closed.