Issue with Gui Showing up on everyones screen

I have a problem with my gui showing up on everyone’s screen. I am not a talented developer at all and only recently started trying to make a game. (ive made another game in the past but that was also when i was just starting). I am 90% sure someone could fix it pretty easily with a one/two lines

Gui issue

2 Likes

You need to get the player, and make the Gui visible for the player. Something like:

ProximityPrompt.Triggered:Connect(function(plr)
   if plr == game.Players.LocalPlayer then
   --rest of code 

   end 
end)

Assuming your using a local script, if not, switch to one

1 Like

I imputed that exact line but never tried it… Ill try it right now

1 Like

image

not sure if i did it right but it did not work, nore does it let the gui open

1 Like

you need another end. Look for the red line highlights. you need 3 ends, with the last one with end)

1 Like

alr, ill fix it in the morning. Thank you

2 Likes

I again don’t know if i did it right, but it does not open anymore

image

I think your using a server script instead of a client script. Using your original code simply change your server script from a script to a LocalScript.

I forgot to do that, but now after trying it doesn’t function. Maybe i have to move where the script is placed?

image

Go into the players playergui so do [Server Script]

local ProximityPrompt = game.Workspace.ShopBlock.ProximityPrompt
ProximityPrompt.Triggered:Connect(Function(Plr)
if Plr.PlayerGui.ShopGui["Shop Frame"].Visible == false then
Plr.PlayerGui.ShopGui["Shop Frame"].Visible = true
else
Plr.PlayerGui.ShopGui["Shop Frame"].Visible = false

This is a server script by the way.

From my lack of knowledge of scripting, i am not sure how to complete the script. What do i have to reference at the top of the script (local.whatever) and do i put my old code below it and above?

Ill edit it to work for you so its easier for you

I edited it again by the way i realised some errors i made

Thank you very much. This i belive is the last bug i’ve seen or had problems with before im done. Last time ive even edited a script was 8 months ago+

Do i remove the old script? or keep it there?

Just replace all the code yes and i belive what i did should work

I made a typo by the way let me change

There are a couple errors and doesn’t work
image

Oh sorry get rid of the upper case F and put a lower case f