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

Certain Team does not have this gui enabled help?

Asked by 5 years ago

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

0
1st line if game.Players.LocalPlayer.Team.Name == "Staff" then F_F 53 — 5y
0
still doesnt work WillBe_Stoped 71 — 5y
0
try adding WaitForChild("PlayerGui") instead of just writing PlayerGui F_F 53 — 5y
0
Is it local script? AswormeDorijan111 531 — 5y
0
Yeah, it's a local script. WillBe_Stoped 71 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
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
0
does not work i even tried adding "print("Done")" it aint work ;/ WillBe_Stoped 71 — 5y
Ad

Answer this question