|
| 06 Jun 2013 07:00 PM |
Hey, can one of you fellow Robloxians post the scripts down there or give me a link to a model? I really need it, Thanks, Mattrock1243
It says 'All Things Roblox' |
|
|
| Report Abuse |
|
|
Moonfang5
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 2523 |
|
|
| 06 Jun 2013 07:01 PM |
| We have Script helpers for a reason. |
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Jun 2013 07:02 PM |
http://www.roblox.com/Forum/ShowForum.aspx?ForumID=20
The Melon Lord Of ATR. |
|
|
| Report Abuse |
|
|
Moonfang5
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 2523 |
|
|
| 06 Jun 2013 07:02 PM |
print("TK script loaded.")
function onHumanoidDied(humanoid, player) local killer = getKillerOfHumanoidIfStillInGame(humanoid) if (killer ~= nil) then handleTKs(player, killer) end end
function onPlayerRespawn(property, player) if property == "Character" and player.Character ~= nil then local humanoid = player.Character.Humanoid local p = player local h = humanoid humanoid.Died:connect(function() onHumanoidDied(h, p) end ) end end
function getKillerOfHumanoidIfStillInGame(humanoid)
local tag = humanoid:findFirstChild("creator")
if tag ~= nil then local killer = tag.Value if killer.Parent ~= nil then return killer end end
return nil end
function handleTKs(player, killer) if (killer.TeamColor == player.TeamColor) then killer.Character.Humanoid.Health = 0 end end
function onPlayerEntered(newPlayer) while true do if newPlayer.Character ~= nil then break end wait(3) end
local humanoid = newPlayer.Character.Humanoid
humanoid.Died:connect(function() onHumanoidDied(humanoid, newPlayer) end ) newPlayer.Changed:connect(function(property) onPlayerRespawn(property, newPlayer) end ) end
game.Players.ChildAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2013 07:03 PM |
And if you need help go to Catalog>Models>Anti-Team Kill script Done.
The Melon Lord Of ATR. |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2013 07:03 PM |
The guy above me helped nao .
The Melon Lord Of ATR. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 06 Jun 2013 07:06 PM |
| That comment wasn't needed |
|
|
| Report Abuse |
|
|