|
| 14 Feb 2012 04:54 PM |
I've tried many things, but no matter what, the anti-team kill script just makes the gun not kill ANYONE. Can anyone help me? |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 04:55 PM |
| Post a script and I'll be glad to fix it for you! |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
| |
|
|
| 14 Feb 2012 04:57 PM |
Yes, there are teams. In one line of the script, it says: local GH = game.Players:findFirstChild(script.Parent.creator.Value.Name) What does 'Value' mean? |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 04:58 PM |
| How did you make the script if you don't know what anything means in the script!!! |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 14 Feb 2012 05:00 PM |
| "Value" means a Value.. -_- |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 05:00 PM |
Rules: No free model fix requests End of discussion |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
| |
|
|
| 14 Feb 2012 05:02 PM |
The script is one that I found, and mixed it with a gun that I rescripted. The rescripted gun has Ammo/MaxAmmo/StoredAmmo, so I don't know if this has to do with anything with the Anti TK script. |
|
|
| Report Abuse |
|
|
| |
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 14 Feb 2012 05:03 PM |
"Mixed it with a gun that I rescripted" By rescripted I'm sure you mean "Changed it to say I made it"
|
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 05:06 PM |
@grove Wrong. It was one of those really old guns that uses the 'Paintball' script. I rescripted 2 of those. One took no more than 15 minutes, while another took more than an hour, do to handle issues. |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 05:07 PM |
By 'rescripted' you probably mean you added print 'I edited this!' |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 14 Feb 2012 05:07 PM |
Fair enough, Still, post the scripts or we can't do anything to help
End of discussion |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 05:09 PM |
Currently, what I have:
ball = script.Parent damage = 30
function Check(hit) local Humanoid = hit.Parent:findFirstChild("Humanoid") if Humanoid then local HisTorso = hit.Parent:findFirstChild("Torso") if HisTorso then if HisTorso.Color == script.Parent.Parent.Torso.Color then return false end if HisTorso.Color ~= script.Parent.Parent.Torso.Color then return true end end end end
function onTouched(hit) Local MyTeam = Check(hit) if not MyTeam then hit.Parent.Humanoid:TakeDamage(damage) end end
function tagHumanoid(humanoid) local tag = ball:findFirstChild("creator") if tag ~= nil then local new_tag = tag:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end connection = ball.Touched:connect(onTouched) wait(8) ball.Parent = nil
I tried 2 different things before so the gun would be anti-TK. |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 14 Feb 2012 05:11 PM |
There is absolutely nothing in that script about TeamColor...
End of discussion |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 05:14 PM |
There is. Where it says: if HisTorso.Color == script.Parent.Parent.Torso.Color then return false end It means that if the shooter tries to kill his teammate who has the same torso color, it does not do anything. Therefor, it means you cannot kill your teammate. However, I am having trouble making it work. |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 05:15 PM |
ball = script.parent teehee |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 14 Feb 2012 05:17 PM |
ball = script.Parent damage = 30 function Check(hit) local Humanoid = hit.Parent:findFirstChild("Humanoid") if Humanoid then function onTouched(hit) local checkteam = game.Players:FindFirstChild(hit.Parent.Name) if checkteam.TeamColor == script.Parent.Parent.Parent.TeamColor then end elseif checkteam.TeamColor ~= script.Parent.Parent.Parent.TeamColor then hit.Parent.Humanoid:TakeDamage(damage) end end function tagHumanoid(humanoid) local tag = ball:findFirstChild("creator") if tag ~= nil then local new_tag = tag:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end connection = ball.Touched:connect(onTouched) wait(8) ball.Parent = nil
End of discussion |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2012 05:17 PM |
I have another Anti TK script, but it only kills you after you have killed your teammate. Not really useful if you're trying to prevent team killing. |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 14 Feb 2012 05:17 PM |
@Cool, how would checking the player's Torso color help decide their team.. :U
End of discussion |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Feb 2012 06:10 PM |
@Grove The script STILL does not work! |
|
|
| Report Abuse |
|
|