How to make a GUI that only a player can see?

I want to make a kind of GUI that congratulates you if you have achieved an objective and unlocked a new area except that (after testing) everyone has the GUI which gives me a problem. If anyone ever knows the answer please put an example of code and not just text

Thank you for your help

Create a LocalScript?

Have the UI Appear with it?

LocalScripts only replicate to the Player?


You could probably create a function where the Player is Awarded a badge, a UI would appear with the Info of the Badge

The GUI appears for everyone and I have already created a localscript for it

when you first join the game is the ui already showing?

badge is not what I want, but thanks you

have a gui that has a local script with something like:

local id = --your id

local plr = game.Players.LocalPlayer

 if plr.UserId ~= id then --detect if player user id is not your user id
script.Parent.Visible = false --don't show gui
end

No I set the visible to false so no

I will try thanks you, I think its that

keep it originally at true and then when the player joins set it to false via script unless they meet a certain requirement eg.(getting a badge)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.