|
| 20 Nov 2012 01:53 PM |
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and script.Parent.Transparency == 0 then hit.Parent:BreakJoints() elseif hit.Parent:FindFirstChild("Humanoid") and script.Parent.Transparency == 1 then print("Nope") end end) ------- please help
|
|
|
| Report Abuse |
|
|
|
| 20 Nov 2012 01:57 PM |
| These values don't seem to be exactly 0 or 1. Use <0.5 for 0 and >0.5 for 1. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 20 Nov 2012 01:58 PM |
| What AFF said. Plus, I would add an else statement to make sure both conditions aren't true |
|
|
| Report Abuse |
|
|
|
| 20 Nov 2012 02:03 PM |
So:
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and script.Parent.Transparency == <0.5 then hit.Parent:BreakJoints() elseif hit.Parent:FindFirstChild("Humanoid") and script.Parent.Transparency == >0.5 then print("Nope") end end)
|
|
|
| Report Abuse |
|
|
|
| 20 Nov 2012 02:16 PM |
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and script.Parent.Transparency < 0.5 then hit.Parent:BreakJoints() elseif hit.Parent:FindFirstChild("Humanoid") and script.Parent.Transparency > 0.5 then print("Nope") end end) |
|
|
| Report Abuse |
|
|