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?
wait(2) repeat wait() until game.Players.LocalPlayer player = game.Players.LocalPlayer character = player.Character if not character then character = player.CharacterAdded:wait() end Mouse = player:GetMouse() humanoid = character:WaitForChild("Humanoid") s = humanoid:LoadAnimation(game.StarterPack.RunAnimScrip.Animation) Mouse.KeyDown:connect(function(key) key = string.lower(key) if string.byte(key) == 48 and player.TeamColor == "Bright blue Team" then s:Play() humanoid.WalkSpeed = 25 end end) Mouse.KeyUp:connect(function(key) key = string.lower(key) if string.byte(key) == 48 and player.TeamColor == "Bright blue Team" then s:Stop() humanoid.WalkSpeed = 16 end end)
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!
if game.Players.LocalPlayer.TeamColor == BrickColor.new('Really Red') then--change the Really Red to the color of your team. --code 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.
wait(2) repeat wait() until game.Players.LocalPlayer player = game.Players.LocalPlayer character = player.Character if not character then character = player.CharacterAdded:wait() end Mouse = player:GetMouse() humanoid = character:WaitForChild("Humanoid") s = humanoid:LoadAnimation(game.StarterPack.RunAnimScrip.Animation) ouse.KeyDown:connect(function(key) key = string.lower(key) if player.TeamColor = BrickColor.new ('Bright Blue') then--Change it to the team color you want. humanoid.WalkSpeed = 25 end end) Mouse.KeyUp:connect(function(key) key = string.lower(key) if string.byte(key) == 48 and player.TeamColor == "Bright blue Team" then s:Stop() humanoid.WalkSpeed = 16 end end)
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:
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!