Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Only lobby team will see it and not the rest, but how?

Asked by 4 years ago

I need help! you see I want to create a spectating button and I want the lobby team to see it and not the rest, I have created a spectating GUI and I don't know where do I put it either a new local script or the current local script please can somebody answer my 2 questions. Also when I was testing my new shooter game, the players that are playing can see the other players in the use of the spectate button, I want only the lobby team to see the spectate button.

1 answer

Log in to vote
0
Answered by 4 years ago

Your first question, you can always check if a player is on a team by using the following:

if game.Players.LocalPlayer.Team == game.Teams.Lobby then
    --script
end

Also, for if you want to put the GUI in the first or a new script, it can be either, as long as the gui doesn't require anything from the first script, or if there is any key variables that interfere with the gui script.

0
Thanks for helping me, and yes I'm using this website to be a pro scripter, I just started scripting last month. Pro10shadowYT 5 — 4y
Ad

Answer this question