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

script keeps saying. CurrentCamera is not a valid member of ImageButton "ItemSelection.ItemView" ? [closed]

Asked by 2 years ago
Edited by JesseSong 2 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).
local cam = Instance.new("Camera")
    cam.Parent = itemSelection.ItemView
    itemSelection.ItemView.CurrentCamera = cam

0
Also, where did you learn to do (local cam = Instance.new("Camera") cam.Parent = itemSelection.ItemView itemSelection.ItemView.CurrentCamera = cam) ? MarkedTomato 810 — 2y
0
This could be taken down for being non-descriptive since I have no clue on what you're doing. All you did is make the question as the error message and provided code which isn't in a code block. MarkedTomato 810 — 2y

Closed as Non-Descriptive by JesseSong

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 2 years ago

I don't think local cam = Instance.new("Camera") is a thing. To do this you need a LocalScript to get the client's camera.

LocalScript

local cam = workspace.CurrentCamera

You don't need to parent it. It's obviously a child of the workspace.

Ad