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 5 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 — 5y
0
Then I get attempt to index a nil value Demolisher5001 0 — 5y
0
please use code blocks hmurban 16 — 5y
0
Try using game.Workspace :Connect() and use game.Workspace:WaitForChild("IntroView") MahadTheIronSword 98 — 5y

1 answer

Log in to vote
0
Answered by 5 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