#Gui only shows up once

1 messages · Page 1 of 1 (latest)

hollow forge
#
local proximityPrompt = script.Parent

proximityPrompt.Triggered:Connect(function(player)
    local playerGui = player:FindFirstChild("PlayerGui")
    local shopGui = playerGui:FindFirstChild("ShopGui")
    shopGui.Enabled = true
    print(shopGui.Enabled)
end)

This only opens the gui once, when I close it and I use the prox prompt again it won't open

The print function tells me that shopGui.Enabled = true, but when I check in the players' gui it's not enabled and it doesn't show up

short thorn
#

well if you close the gui in a local script then you cant enable it again in a server script

#

cus im pretty sure the local script has priority or something

untold whale
short thorn
#

makes sense

hollow forge
#

thanks

#

so should i enable it only on the server or on the client

#

do i need a remote event or something

untold whale
round plinthBOT
#

studio** You are now Level 1! **studio

untold whale
untold whale
hollow forge
#

oh

#

so do i need a remote event

untold whale
#

yeah don't rely on people tell you what to do

hollow forge
#

uh ok

untold whale
#

remotes are one way yas

hollow forge
#

is there another way i could do it without remote events

untold whale
#

set up so you only need to do work on one side

#

or remotefunction

#

technically the input action system could do it too thonkoof

hollow forge
#

wait does the script i wrote above enable it on the server or on the client

untold whale
#

idk, you wrote it..?

hollow forge
#

😭

untold whale
#

based on context, you're opening it on server and closing on client, just an educated guess

#

pretty safe bet, it's common beginner problem

hollow forge
#

ok so how do enable it only on the client instead

#

i thought that script did enable it on the client

untold whale
#

google it