How can i add a highlight to the player that gets the gui

basically i created a gui that appears only for the local player

after appearing, the player who got the gui should be getting the highlight that everyone can see

it would work, if there were one player in the server, but if another player joins the server, the script wouldnt work on the other players

how can i fix this?

Try to add the highlight when a new player joins using PlayerAdded().
https://developer.roblox.com/en-us/api-reference/event/Players/PlayerAdded

the highlight is already added to the player when they join, it’s just disabled until the gui appears

There is not enough information given, do you have a script/scripts of some sort?


What do you mean? As in you can’t enable it or something?

what i mean is, when the gui appears for the player, the highlight should be enabled for them
but since another player has joined recently (my alt), the highlight doesnt enable on my main account, but it enables on my alt account because it joined recently

fixed the problem

i inserted a remote server inside a local script, and then added a server script
example1
and here are the scripts that fixed this thing
example2
example3