i make a team selection gui in StarterGui. i also added a local script to make the selection screen gone and added a humanoid in player character. it did work fine until i tested it on server with 2 players. the gui did disappeared and both worked fine for 2 players but the bool value that i place on the workspace didnt change its value.
--startgame
script.Parent.choose.Defend.Activated:connect(function()
local defend = Instance.new("Humanoid")
defend.Name = "Defend"
defend.Parent = game.Players.LocalPlayer.Character
script.Parent.choose.Enabled = false
game.Workspace.defend.Value = true
end)
script.Parent.choose.Prosecutor.Activated:connect(function()
local prosecutor = Instance.new("Humanoid")
prosecutor.Name = "Prosecutor"
prosecutor.Parent = game.Players.LocalPlayer.Character
script.Parent.choose.Enabled = false
game.Workspace.prosecutor.Value = true
end)
--ready

1 comment
this is something new for me. thx for the help