So yeah the proximityprompt works first time and prints hey and second time it prints hey but won’t enable the gui
Here is my script:
script.Parent.ProximityPrompt.Triggered:Connect(function(Player)
print("Hey")
if Player.PlayerGui.ScreenGui.Enabled == false then
Player.PlayerGui.ScreenGui.Enabled = true
end
end)
I’m almost 100% sure of why is this happening. You’re setting the ScreenGui.Enabled to false with a LocalScript to close it right? If that’s the case; when you change this locally the server thinks it’s still enabled, so when you run it again, even if it’s set to false, it will not perform any action because of this.
To stop this from happening you should fire a RemoteEvent to the client and enable the ScreenGui from there.
The code you provided indeed is a server-sided script.
I’m talking about the script you use to close the ScreenGui, because in OP you specified you re-open it again, deducting you have something that closes it.