Works in studio but not in server mode. there is no error so idk what to do, just look it over and tell me what went wrong. this codeis in Normal Script
function joined(Player)
local ShockTrooper = 3867785
local MoA = 3569513
local MP = 3793252
local Protect = 3824300
function civilian()
Player.Character.Head.Click:Play()
Player.TeamColor = BrickColor.new("White")
end
function rebel()
Player.Character.Head.Click:Play()
Player.TeamColor = BrickColor.new("Bright red")
end
function cadet()
if Player:IsInGroup(MoA) then
Player.Character.Head.Click:Play()
Player.TeamColor = BrickColor.new("New yeller")
end
end
function arcanian()
if Player:IsInGroup(MoA) then
Player.Character.Head.Click:Play()
Player.TeamColor = BrickColor.new("Deep orange")
end
end
function shock()
if Player:IsInGroup(ShockTrooper) then
Player.Character.Head.Click:Play()
Player.TeamColor = BrickColor.new("Persimmon")
end
end
function militarypolice()
if Player:IsInGroup(MP) then
Player.Character.Head.Click:Play()
Player.TeamColor = BrickColor.new("Crimson")
end
end
function protectors()
if Player:IsInGroup(Protect) then
Player.Character.Head.Click:Play()
Player.TeamColor = BrickColor.new("CGA brown")
end
end
function overlord()
if Player:GetRoleInGroup(3569513) == 255 then
Player.Character.Head.Click:Play()
Player.TeamColor = BrickColor.new("Gold")
end
end
function back()
Player.Character.Head.Click:Play()
script.Parent.Parent.Teams.Visible = false
script.Parent.Parent.Play.Visible = true
end
end
script.Parent.Civilian.MouseButton1Click:connect(civilian)
script.Parent.Rebel.MouseButton1Click:connect(rebel)
script.Parent.Cadet.MouseButton1Click:connect(cadet)
script.Parent.Arcanian.MouseButton1Click:connect(arcanian)
script.Parent["Shock Trooper"].MouseButton1Click:connect(shock)
script.Parent["Military Police"].MouseButton1Click:connect(militarypolice)
script.Parent.Protector.MouseButton1Click:connect(protectors)
script.Parent.OverLord.MouseButton1Click:connect(overlord)
script.Parent.Back.MouseButton1Click:connect(back)
game.Players.ChildAdded:connect(joined)

1 comment
no