How to detect which proximity prompt from the table was pressed

Continuing from this: (code in this post)

How does my function detect which of the proximity prompts was pressed?

function Func(proximityPrompt)

end

for i,v in pairs(promptTable) do
     v.Triggered:Connect(function()
           testFunc(v) --// v is the proximity prompt that you are pressed
     end)
end
1 Like

Ah, so all I needed to do was put an extra step in. Thanks!

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