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

Part not a valid member of Workspace?

Asked by 6 years ago

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?

0
workspace:FindFirstChild("IntroView") User#19524 175 — 6y
0
Then I get attempt to index a nil value Demolisher5001 0 — 6y
0
please use code blocks hmurban 16 — 6y
0
Try using game.Workspace :Connect() and use game.Workspace:WaitForChild("IntroView") MahadTheIronSword 98 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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.

Ad

Answer this question