So I’m trying to get a Proximity prompt to work. Its in a part in the workspace.
And to get it to work trough a localscript, Im trying to locate it by going trough a surfaceGui.Adornee.
The surfaceGui itself is in StarterGui. The code thats in the surfacegui looks something like this:
local insertPrompt = script.Parent.Adornee.Parent
But it outputs:
Players.PowWow_TheGreat.PlayerGui.ATMGuis.Original.ATMManager:9: attempt to index nil with 'Parent'
Even tho the adornee is clearly set to the Screen part.
I dont understand why the SurfaceGui.Adornee doesnt bring me inside the ATM Model even tho it clearly is…
All I’m trying to do is identify the Proximity Prompt in my localScript. But its impossible by going trough game.Workspace. Anyone knows why it doesnt detect anything after accessing the SurfaceGui.Adornee?
This wont work since there is plenty of atms in the map… And I need to specify THE one that the player is near…
I just dont understand why script.Parent.Adornee doesnt bring me to Screen
No its not. Since players interact with it, it has to be in playergui.
Reason why I HAVE to go trough the SurfaceGui.Adornee.
But Idk why it doesnt work…