So the issue im facing is, The script isnt running.
By not running I mean that none of the lines are being executed.
print("AA1")
local proximityPrompt = script.Parent.ProximityPrompt
print("AA2")
local seat = script.Parent.Parent.Parent.Seat.Seat
print("AA3")
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
print("AA4")
proximityPrompt.Enabled = not proximityPrompt.Enabled
end)
proximityPrompt.Triggered:Connect(function(player)
print("Clicked")
local gui = player.PlayerGui.PassportGui
print("A5")
gui.Enabled = not gui.Enabled
print("A6")
end)
Here i have 2 Functions, 1 enables the Proximity Prompt and other is a trigger.
When the player sit on a particular seat its supposed to enable the Prompt.
And the trigger is supposed to activate an UI.
Ive added multiple print statements but none of them print anything.
I dont understand what Issue am i facing,
The script is enabled so that shouldnt be a issue, And when testing in game the script dosent delete.