I have Werewolves vs Humans(or Vampires.. doesn't matter) And I got AWESOME animations for both teams. I ONLY want the WereWolf team to have certain "Local" scripts, with the animations as a child. And Same for the other team. I don't know how to do that. I've tried. Mind helping me out?
01 | wait( 2 ) |
02 |
03 | repeat |
04 | wait() |
05 | until game.Players.LocalPlayer |
06 |
07 | player = game.Players.LocalPlayer |
08 | character = player.Character |
09 | if not character then |
10 | character = player.CharacterAdded:wait() |
11 | end |
12 |
13 | Mouse = player:GetMouse() |
14 | humanoid = character:WaitForChild( "Humanoid" ) |
15 | s = humanoid:LoadAnimation(game.StarterPack.RunAnimScrip.Animation) |
It's Very Simple
Well, it's really easy and useful to use, you can use an if
function, to check if a player is wearing a certain item, doing a certain action(like jumping or walking), etc.
The Code
You can check if a player is on a team of a sort, like this!
1 | if game.Players.LocalPlayer.TeamColor = = BrickColor.new( 'Really Red' ) then --change the Really Red to the color of your team. |
2 | --code |
3 | end |
So...
Hopefully this helped you, if you have any more questions, just message me on Roblox.
GreekGodOfMLG
P.S
The edited version of the script you wanted and where to implant it.
01 | wait( 2 ) |
02 | repeat |
03 | wait() |
04 | until game.Players.LocalPlayer |
05 | player = game.Players.LocalPlayer |
06 | character = player.Character |
07 | if not character then |
08 | character = player.CharacterAdded:wait() |
09 | end |
10 | Mouse = player:GetMouse() |
11 | humanoid = character:WaitForChild( "Humanoid" ) |
12 | s = humanoid:LoadAnimation(game.StarterPack.RunAnimScrip.Animation) |
13 | ouse.KeyDown:connect( function (key) |
14 | key = string.lower(key) |
15 | if player.TeamColor = BrickColor.new ( 'Bright Blue' ) then --Change it to the team color you want. |
Well, I'm not the best scripter, but I think I might know how to solve this one. You'd have to figure out what team a player is on by:
1 | game.Players.LocalPlayer.TeamColor --Not completing it, cause I don't know how to.... |
Then make it so that If a player is on the Black team(Dark for werewolf?), then that person would get these animations, and if a player was on the Red team(Vampires?), they'd get the other animations.
Correct me if i'm wrong... :P
This is not what I ment sorry can't help ya, matter of fact I am terrible at scripting!