OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 18 Jun 2013 12:32 AM |
--do damage to any humanoids hit local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") if humanoid then humanoid:TakeDamage(80) if humanoid.Health < 1 then local p = game.Players[script.Parent.Parent.Name] local k = game.Players[humanoid.Parent.Name] if k.leaderstats.Reuptation.Value == 0 then p.leadersats.Reuptation.Value = p.leadersats.Reuptation.Value - 10 elseif k.leaderstats.Reuptation.Value > 0 and k.leaderstats.Reuptation.Value < 150 then p.leadersats.Reuptation.Value = p.leadersats.Reuptation.Value - 50 elseif k.leaderstats.Reuptation.Value > 149 then p.leadersats.Reuptation.Value = p.leadersats.Reuptation.Value - 200 elseif k.leaderstats.Reuptation.Value < 0 and k.leaderstats.Reuptation.Value > -150 then p.leadersats.Reuptation.Value = p.leadersats.Reuptation.Value + 50 elseif k.leaderstats.Reuptation.Value < -150 then p.leadersats.Reuptation.Value = p.leadersats.Reuptation.Value + 75 end end
I edited this in the raycast gun script from the wiki. It's just a function. It won't work. No output found in server mode. |
|
|
| Report Abuse |
|
|
|
| 18 Jun 2013 12:34 AM |
| mm.... there is no function... what defines "hit"? |
|
|
| Report Abuse |
|
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 18 Jun 2013 12:35 AM |
local hit, position = game.Workspace:FindPartOnRay(ray, user) user = tool.Parent
|
|
|
| Report Abuse |
|
|
baheeg
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 72846 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 18 Jun 2013 01:00 AM |
| local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") |
|
|
| Report Abuse |
|
|
baheeg
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 72846 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 18 Jun 2013 02:00 AM |
I cahnged it to ~= nil and it still doesnt work.
i can smell you |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 18 Jun 2013 02:00 AM |
"local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid")"
I don't think you could set a variable like that |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 18 Jun 2013 02:04 AM |
also, you didn't quite define "hit"
http://wiki.roblox.com/index.php/Hit |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 18 Jun 2013 02:20 AM |
Everthing is the same as the raycasting gun on the wiki Except for the part i changed. |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
| |
|
baheeg
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 72846 |
|
| |
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 18 Jun 2013 02:31 AM |
| Its not helping if you dont know how ;c |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 18 Jun 2013 05:22 AM |
Out of curiosity, why won't testing with a pseudoserver (Start Server or Start Player test options) work versus an actual server environment?
I don't want to hijack the thread, but this struck me as odd. |
|
|
| Report Abuse |
|
|