I am trying to make a GUI that is exclusive for a team. Like a GUI that become visible if a player is on a certain team. Here what I thought to do:
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
if Players.LocalPlayer.Teams == BrickColor.new("New Yeller")then
game.StarterGui.Buttons.Host.Visible = true
else
game.StarterGui.Buttons.Host.Visible = false
end
No result in input but nothing happened. I also tried putting it in both types of script with again, no result. I also experimented with at least an error
local team = game.Teams.Host
local Players = game:GetService("Players")
if Players.LocalPlayer.team == game.team then --Error here (Workspace.Script:4: attempt to index field 'LocalPlayer' (a nil value))--
game.StarterGui.Buttons.Host.Visible = true
else
game.StarterGui.Buttons.Host.Visible = false
end
What am I doing wrong?

4 comments
/
@Vortex_Vasne I love how you sent him to a website clearly explaining why you downvoted :) I would have done the same thing. I hate it when a person asks for free scripts, especially illegitamitely without any descriptions, motives, or reasoning. New developers and users cannot have a one liner by any means neccessary
Ight Im going to add the script that didn't work. I don't have much to add that works but ill try.
Better.