Hello, I am trying to create a script for a ProximityPrompt where a TextButton becomes visible once activated. I also have a LocalScript inside of the TextButton which sets visible to false once it’s activated, which works perfectly fine.
The issue is that the script only works the first time, and afterwards the TextButton doesn’t become visible. I added a print statement to the function which verified that it’s the line which changes .Visible which doesn’t work.
local player = game.Players.LocalPlayer
local PlayerGui = player.PlayerGui
script.Parent.Activated:Connect(function()
PlayerGui.TeleportOptions.StoreTeleportGui.Visible = false
end)
sounds like the first script is a normal script and the second an local script, If the scripts are different, the GUIObject will be visible on the server and it cannot be invisible again on the client, consider making both scripts an local script