Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is the player being put on the wrong team?

I'm making a change team script and I have this in a local script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local test = ReplicatedStorage:WaitForChild("Test")
local AmmunitionColor = "Navy Blue"

script.Parent.MouseButton1Click:Connect(function()
	
	test:FireServer(BrickColor.new(AmmunitionColor))
	
	
end)

I also have this in a regular script:

game.ReplicatedStorage.Test.OnServerEvent:Connect(function(player,teamColor)

player.TeamColor = teamColor



	
	
	end)

When i click the button the player is put on a new neutral team not the Ammunition team why?

1 answer

✓ Accepted answer

BrickColors are case sensitive; they do not follow medial capitals:

local AmmunitionColor = "Navy blue"

This discussion is preserved as it was. New answers, comments, and votes are closed.