#My team changer won't wokr

1 messages · Page 1 of 1 (latest)

oblique wharf
stray crane
oblique wharf
#

No

tired smelt
#

and errors on the output

stray crane
stray crane
oblique wharf
#

Wdym

stray crane
hollow topaz
#

Sending a video of u spam clicking a GUI doesnt tell us shit

oblique wharf
#

There's no errors in my codes

#

I've checked multiple times

hollow topaz
#

Can you at least send the script that is supposed to be changing the teams?

fiery dragon
#

yeah if there is no error, then you are def doing something wrong with team changing.

hollow topaz
#

^this

oblique wharf
#

TeamName = "Civilian"
Teams = game:GetService("Teams")
Player = game.Players.LocalPlayer
Gui = nil
function TrackGui(Par,LastPar)
if Par.ClassName=="PlayerGui" then
Gui = LastPar
else
TrackGui(Par.Parent,Par)
end
end
TrackGui(script.Parent,nil)
if #Teams:GetChildren()>0 then
for num,team in pairs(Teams:GetChildren()) do
if string.lower(team.Name)==string.lower(TeamName) then
if team.TeamColor~=Player.TeamColor then
script.Parent:remove()
end
end
end
end

#

That's what one works

#

But when I did police fd they don't work

hollow topaz
#

I suggest you do this:

#
  1. Create RemoteEvent in replicatedStorage and name it "TeamChange"
#
  1. Create Local scripts for every button in the team change gui
#
  1. In every local script type in this:
tired smelt
#

use local scripts in startergui and a script inside sss if you want to handle things good

hollow topaz
#
local RemoteEvent = game.ReplicatedStorage.TeamChange

script.Parent.Activated:Connect(function()
    RemoteEvent:FireServer("PUT_TEAM_COLOR_HERE")
end)
#

change the "PUT_TEAM_COLOR_HERE"

#

with the brickcolor of the team

#
  1. Put a server script in the ServerScriptService
#
  1. Paste in this shit:
oblique wharf
#

I got this code from my friend cuz he helped me out

#

So I have to change a lot off stiff to it

hollow topaz
#
local RemoteEvent = game.ReplicatedStorage.TeamChange

RemoteEvent.OnServerEvent:Connect(function(plr, teamColor)
    plr.TeamColor = BrickColor.new(teamColor)
    plr:LoadCharacter()
end)
#

and done

oblique wharf
#

So do use both the code u sent

hollow topaz
oblique wharf
#

Ok will do

hollow topaz
oblique wharf
#

What should I put the color

#

The team color

hollow topaz
#

The color of the team

#

When you have

#

A team

#

It has a color

#

It's a brickcolor

#

Put the name of the color there

fiery dragon
#

this guy a legend fs

#

goes all out to help you, W

hollow topaz
#

@oblique wharf

#

did it work or not

oblique wharf
#

When I pasted the first code it just messed up the spawner