I am trying to do a script but for some reason the so called script does no fire twice. It runs first time completely fine but second time, na-da. heres the script,
local prompt = script.Parent.ProximityPrompt
prompt.Triggered:Connect(function(plr)
plr.PlayerGui.TP.Frame22.Visible = true
end)
Its supposed to set visibility of “Frame22” to true but when I close the GUI, it wont open again.
If the GUI closes through a LocalScript, it would mean the Server is still thinking the GUI is open, because there isn’t any communication to indicate to the Server that the Player has closed a GUI.
To counter this, utilise RemoteEvents, and fire RemoteEvents from the Client through the Server, to indicate to the ServerScript when it receives the RemoteEvent that the GUI is closed.