I am working in a game where there are 5 buttons, but only 1 works. I already created a function when the correct button is triggered, but I want to create another one when the wrong buttons are pressed. I am using a table and will get the correct button from it, how can I specify the 4 other buttons in a script?
Here is the script:
local ProximityPromptService = game:GetService("ProximityPromptService")
s = game.Workspace.S
OfficialFinish = {}
FTable = {
s.0,
s.01,
s.02,
s.03,
s.04
}
local Finishe = FTable[math.random(#FTable)]
table.insert(OfficialFinish, Finishe)
wait()
print(OfficialFinish[1])
-- ESCAPE
OfficialFinish[1].ProximityPrompt.Triggered:Connect(function(player)
-- function
end)
after the script, I would like to add another
ProximityPrompt.Triggered
, but instead of the chosen variable from the table, I want the Non-Chosen variables to trigger. For example, the chosen variable is s.0 , I want the s.01 to s.04 to trigger instead.
This must be an easy problem, but I have no idea. Thank you for helping!