#My team changer won't wokr
1 messages · Page 1 of 1 (latest)
You click so fast
No
Why NOT!!!! HUH
IF I SAY YOU CLIC FAST U CLICK FAST MY GUY THATS MY OP;INION
Wdym
I mean YOU CLICK FAST
We need to see scripts or possible lines of error to help bro
Sending a video of u spam clicking a GUI doesnt tell us shit
Can you at least send the script that is supposed to be changing the teams?
yeah if there is no error, then you are def doing something wrong with team changing.
^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
I suggest you do this:
- Create RemoteEvent in replicatedStorage and name it "TeamChange"
- Create Local scripts for every button in the team change gui
- In every local script type in this:
okay so use playergui
use local scripts in startergui and a script inside sss if you want to handle things good
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
- Put a server script in the ServerScriptService
- Paste in this shit:
I got this code from my friend cuz he helped me out
So I have to change a lot off stiff to it
local RemoteEvent = game.ReplicatedStorage.TeamChange
RemoteEvent.OnServerEvent:Connect(function(plr, teamColor)
plr.TeamColor = BrickColor.new(teamColor)
plr:LoadCharacter()
end)
and done
So do use both the code u sent
follow every step as I said
Ok will do
Should look like this
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
When I pasted the first code it just messed up the spawner