MouseButton1Click not registering

Still doesn’t work, oddly.
Infinite yield possible on ‘Players.ValtryekRBLX.PlayerGui.ScreenGui.ShopFrame.ScrollingFrame.ObjHolder.Mage:WaitForChild(“Camera”)’

well instead of waiting for it you could try instancing the camera like:

local Cam = instance.new("Camera")
Cam.Parent = "thefolder"

maybe the path isnt right anymore or something

1 Like

I’ll try that, thank you very much.

1 Like

12:16:38.661 Players.ValtryekRBLX.PlayerGui.ScreenGui.ShopFrame.ScrollingFrame.ObjHolder.Mage.Button.LocalScript:8: invalid argument #1 to ‘new’ (string expected, got table) - Client - LocalScript:8
I copied your exact code and it didn’t work ):

Im just a little confused with your error.

My code needed a capitol I in Instance
also the Parent needs to be an object

Maybe you can send a picture because I dont understand how you got “invalid argument #1 to ‘new’ (string expected, got table)”

1 Like

i fixed the instance bit + i made the parent the Viewport, idk if this is ok

I had no idea you could use a colon for Instance:new() lol
It looks good
Only concern is the parent for the camera is nil maybe set that to the viewport frame

1 Like

I am beyond stupid, but yeah it worked now! the only problem is that the camera isn’t aligned to the object. I’ll try and fix this.

I made it work and adjusted the FOV, but I couldn’t have done it without you. Thank you so much for your time!

1 Like

Yeah no problem feel free to send me a message if you have any other problems btw !

I hope everything works
Have a good day

1 Like

Camera instances are destroyed at the initial runtime. The solution is to create the camera instances during runtime (as you suggested).

1 Like