I have this script:
Bullet.BrickColor=BrickColor.new("New Yeller")
That makes the bullet that come out Yellow, I am trying to make it change the bullet color to your team color and cant find out how to do that. If you can, could you help me with that task?
That depends whether your script is local or server-sided, although a local script is recommended to use.
If it's local-sided, you would simply use LocalPlayer.
Bullet.BrickColor = game.Players.LocalPlayer.TeamColor
If it's server-sided, you use the :GetPlayerFromCharacter() method.
Bullet.BrickColor = game.Players:GetPlayerFromCharacter(script.Parent.Parent).TeamColor
script.Parent.Parent
assumes that script.Parent
is the tool, and the parent of that is the character.
Well, when working with anything that will be inside a Player, you should use a LocalScript. Now you can simply get the Player with game.Players.LocalPlayer
workspace.Part.BrickColor = game.Players.LocalPlayer.TeamColor