AkatUme
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 1598 |
|
|
| 31 Aug 2015 09:13 PM |
HELLO! I don't know if you are familiar with the linked sword, but there is a function in the main script, and it is the function that does the damage:
function blow(hit) if (hit.Parent == nil) then return end -- happens when bullet hits sword local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil and game.Players:GetPlayerFromCharacter(humanoid.Parent).TeamColor ~= vPlayer.TeamColor then ----THIS PART ISNT WORKING print(vPlayer.TeamColor) -----AND NOR IS THIS PART, IT WONT PRINT ANYTHING, NOT EVEN A STRING local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end
Do you know why it won't print?
~AkatUme~(RedPlum)~ Scripter, Builder, Trader~ |
|
|
| Report Abuse |
|
|
AkatUme
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 1598 |
|
|
| 31 Aug 2015 09:14 PM |
!! I forgot to say thank you!
~AkatUme~(RedPlum)~ Scripter, Builder, Trader~ |
|
|
| Report Abuse |
|
|
AkatUme
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 1598 |
|
|
| 31 Aug 2015 09:24 PM |
Wtf... Actually NOTHING will print, no matter where it is in the script..
~AkatUme~(RedPlum)~ Scripter, Builder, Trader~ |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2015 09:42 PM |
| I don't actually know if this is the problem, but I know that sometimes I'll run into object errors. Try doing print(tostring(vPlayer.TeamColor)) or something like that. |
|
|
| Report Abuse |
|
|
AkatUme
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 1598 |
|
|
| 01 Sep 2015 04:03 PM |
Thank you so much for the response!
Actually, I figured out the problem. Thanks though anyway!
~AkatUme~(RedPlum)~ Scripter, Builder, Trader~ |
|
|
| Report Abuse |
|
|