Proximity Prompt not working with camera manipulation

I am attempting to make a camera manipulation fired by a proximity prompt. The player who triggers the proximity prompt will manipulate the camera into viewing a weapon catalog, only for the player who trigged the proximity prompt.

The problem is that when the proximity prompt is triggered, nothing happens, even though there is a LocalScript with code which is supposed fire when the proximity prompt is triggered, as shown in the image below.

I’ve viewed another post from user sc0rpi0n_oldschool who was trying to do what I am currently trying to do. Someone mentioned a solution involving RemoteEvents and Tweening, but my knowledge of those two subjects is very limited.

Just need some help in order to make this thing work, thanks.

2 Likes

Local Scripts don’t run in workspace unless parented to a character model

2 Likes

Basically what Jqck said but it doesn’t have to be only in character model, as per LocalScript documentation:

A LocalScript will only run Lua code if it is a descendant of one of the following objects:

Ah ok, I’ll try it with a serverscript and see what happens. I used a localscript in the first place because it worked with a camera manipulation I used to make the game’s main menu.

You don’t necessarily need to use a server script, just move the local script to StarterPlayerScripts and reference the proximity prompt in workspace from there

Cool, thank you. I’ll see how it works tmrw (currently travelling.)

Yup, it worked. Although I did have another issue involving how I was referencing the variables which I thought was strange, it worked in the end. Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.