|
| 16 Nov 2014 08:54 PM |
if humanoid then if game.Players:GetPlayerFromCharacter(humanoid.Parent).TeamColor ~= plr.TeamColor then humanoid.Health = humanoid.Health - 10 end end
Any suggestions on how exactly I should complete this? I tried adding in the else but nothing I do works. |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 09:03 PM |
teams = red,blue
player = p
if p is team red then p cannot kill another red p()
if p is team blue then p cannot kill another blue p()
game.worksapce.parent = mommmmma()
parent = set player touch forcefield())
|
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 09:05 PM |
| ...holy crap you suck at scripting....... you have no clue how it works... |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 09:19 PM |
if user.touched = team = team blue then do
team.blue end
do (nothing) end
if team other then do kill()
end |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 09:21 PM |
| What is they are a dummy and don't have a player attatched to them? |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 10:43 PM |
1337 scripting skills xD.
Anyway, that should work. Try checking the .string property of BrickColors. |
|
|
| Report Abuse |
|
|
GOLDC3PO
|
  |
| Joined: 31 May 2011 |
| Total Posts: 509 |
|
|
| 17 Nov 2014 03:56 AM |
hit.Function(checkiftkthenkill()) funckytion checkiftkthenkill() killanyway() end function killanyway() game.Players.LocalPlayer:IsStupid() = true Instance.new("Scrupt").Ketchup = "loadstring([[print("Hi matey")]])" end |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 17 Nov 2014 05:04 AM |
function CheckColor(color, enemy) if enemy.TeamColor ~= BrickColor.new(color) then return false end end
script.Parent.Touched:connect(function(hit) local Human = hit.Parent:FindFirstChild("Humanoid") local Player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) if Human and Player and CheckColor("Really red", Player) == false then Human:TakeDamage(20) end end)
Ehh it depends if it's a localscript because if so then you could do
local YourSelf = game:GetService("Players").LocalPlayer if Human and Player and CheckColor(YourSelf.TeamColor, Player) == false
If the bullet/sword hits the player then it checks if he is on the same team color as you |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 17 Nov 2014 05:36 AM |
>Ehh it depends if it's a localscript because if so then you could do
>local YourSelf = game:GetService("Players").LocalPlayer >if Human and Player and CheckColor(YourSelf.TeamColor, Player) == false
Forget I said that. I'm too tired to think. |
|
|
| Report Abuse |
|
|