|
| 09 Oct 2013 09:31 PM |
This is the part of a weapon that checks if the player has a humanoid, will this work (the team part value and the plr3 variable)
function onTouched(hit) humanoid = hit.Parent:findFirstChild("Humanoid") plr3 = hit.Parent:getPlayerFromCharacter() if humanoid~=nil and pl3.TeamColor ~= script.Parent.Parent.Parent.TeamColor then tagHumanoid(humanoid) humanoid.Health = humanoid.Health - damage wait(2) untagHumanoid(humanoid) else wait(2) connection:disconnect() end end |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2013 09:35 PM |
function onTouched(hit)
humanoid = hit.Parent:findFirstChild("Humanoid")
if humanoid then
plr3 = getPlayerFromCharacter(hit.Parent)
if plr3.TeamColor ~= script.Parent.Parent.Parent.TeamColor then
tagHumanoid(humanoid) humanoid.Health = humanoid.Health - damage wait(2) untagHumanoid(humanoid)
end
end
end |
|
|
| Report Abuse |
|
|
| |
|