Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Certain Team does not have this gui enabled help?

Soooo, Basically I want to try make me a script where if a player is on a certain "Team" then I want a gui to not be disabled for them i may suck at explaining but ill try

if game.Players.LocalPlayer.Team == "Staff" then
	game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui").Spawn.TextButton.LocalScript.Disabled = false
	game.Players.LocalPlayer.PlayerGui.ScreenGui.Spawn.TextButton.Text = "SPAWN BALL"
	game.Players.LocalPlayer.PlayerGui.ScreenGui.Spawn.TextButton.BackgroundColor3 = Color3.new(255,255,255)
end

This is it. A regular player that is on any other team besides "Staff" has the gui disabled if they are on Staff then the gui is not disabled

5 comments

0

1st line if game.Players.LocalPlayer.Team.Name == "Staff" then

0

still doesnt work

0

try adding WaitForChild("PlayerGui") instead of just writing PlayerGui

0

Is it local script?

0

Yeah, it's a local script.

1 answer

if game.Players.LocalPlayer.Team.Name == "Staff" then --you forgot the name
    game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui").Spawn.TextButton.LocalScript.Disabled = false
    game.Players.LocalPlayer.PlayerGui.ScreenGui.Spawn.TextButton.Text = "SPAWN BALL"
    game.Players.LocalPlayer.PlayerGui.ScreenGui.Spawn.TextButton.BackgroundColor3 = Color3.new(BrickColor.new("Industrial white")) -- maybe glitch cuz of color (it happend me a lot of times)
end

1 comment

0

does not work i even tried adding "print("Done")" it aint work ;/

This discussion is preserved as it was. New answers, comments, and votes are closed.