Hello, I’m currently having an issue where when I set my proximity promt to Disabled
meaning the player cannot use the promt. After 30 seconds it should be Enabled
however it does not go back to Enabled
. I’m wondering if it’s client sided or if I’m generally doing something wrong.
After an event is triggered from a GUI, a Server Script gets the RemoteEvent and makes the Promt Disabled
if the Event has a certain value, after 30 seconds the Promt should then go back to Enabled
.
Here is the code:
Sending Event:
game:GetService('ReplicatedStorage').RobberyDoorEvent:FireServer("CompletedAll")
Receiving Event:
game:GetService('ReplicatedStorage').RobberyDoorEvent.OnServerEvent:Connect(function(player, reason)
if reason == "Timer" then
script.Parent.Transparency = 0
script.Parent.CanCollide = true
wait(30)
script.Parent.ProximityPrompt.Enabled = true
elseif reason == "MissedAll" then
script.Parent.Transparency = 0
script.Parent.CanCollide = true
wait(30)
script.Parent.ProximityPrompt.Enabled = true
elseif reason == "CompletedAll" then -
tweenOpen:Play()
wait(5)
tweenClose:Play()
end
end)