|
| 07 Jul 2012 09:37 PM |
while true do g = game.Players:GetChildren() for i = 1, #g do mag = (script.Parent.Center.Position – g[i].Character.Torso.Position).magnitude if mag < 200 then local ray = Ray.new( script.Parent.Center.p, (g[i].Character.Torso – script.Parent.Center.p).unit * 200 ) local gun = script.Parent.Center local Hit,Position = game.Workspace:FindPartOnRay(ray,gun) if Hit then if Hit.Parent:FindFirstChild("Humanoid") then if game.Players:GetPlayerFromCharacter(Hit.Parent)== g[i] then Hit.Parent.Humanoid:TakeDamage(30) end end end end end wait() end
|
|
|
| Report Abuse |
|
|
| 07 Jul 2012 09:39 PM |
script.Parent.Center.CFrame.p
I'll look for more problems |
|
|
| Report Abuse |
|
|
| 07 Jul 2012 09:40 PM |
| Oops, my bad. Okay thanks. |
|
|
| Report Abuse |
|