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

Part not a valid member of Workspace?

local Player = game.Players.LocalPlayer local Character = Player.Character local Camera = workspace.CurrentCamera

script.Parent.MouseButton1Down:connect(function() repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable Camera.CFrame = workspace.IntroView.CFrame print "View Changed" script.Parent.Parent:TweenPosition(UDim2.new(0,0,-2,0),"Out","Quad", 1) print "Menu Moved" end)

Introview is a part a standard part. Why is it not a valid member of workspace?

4 comments

0

workspace:FindFirstChild("IntroView")

0

Then I get attempt to index a nil value

0

please use code blocks

0

Try using game.Workspace :Connect() and use game.Workspace:WaitForChild("IntroView")

1 answer

When you want to set a camera view you have to have a subject (Your camera part). You would go, CameraSubject = YourPart. If you don't set your subject it won't work.

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