Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Part is not a valid member of workspace?

Asked by 3 years ago
Edited 3 years ago

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)

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. cmgtotalyawesome 1418 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

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

Ad

Answer this question