|
| 19 Jul 2016 11:15 AM |
This script is supposed to create an explosion, and kill any members of enemy teams, without causing an actual explosion (that would destroy/kill anything, regardless of team) occurring.
The script doesn't do anything, and I don't know why. Output didn't give me anything.
Can someone please help me?
Here's the script:
local activated = false local mash = math.random(20,30)
function Hurt(hit) if hit.Parent then if hit.Parent:findFirstChild("Humanoid") then local Person = script.Parent:findFirstChild("creator") local victim = game.Players:findFirstChild(hit.Parent.Name) if victim ~= Person.Value and victim.TeamColor ~= Person.Value.TeamColor then local New = 300 local ct=script.Parent:FindFirstChild("creator") ct:clone().Parent = hit.Parent.Humanoid wait(0.01) hit.Parent.Humanoid:TakeDamage(New) end end end end
function onTouch(hit) if not activated then script.Parent.Transparency = 1 script.Parent.Anchored = true activated = true local sound = Instance.new("Sound") sound.SoundId = "http://www.roblox.com/asset/?id=16976189" sound.Pitch = .9 sound.Volume = 1 sound.Parent = script.Parent sound:Play() local e = Instance.new("Explosion") e.BlastPressure = 0 e.BlastRadius = 60 e.Parent = game.Workspace e.Hit:connect(Hurt) e.Position = script.Parent.Position script.Parent:remove() end end
script.Parent.Touched:connect(onTouch)
|
|
|
| Report Abuse |
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 19 Jul 2016 11:26 AM |
" if victim ~= Person.Value and victim.TeamColor ~= Person.Value.TeamColor then"
what?
|
|
|
| Report Abuse |
|
|
| 19 Jul 2016 11:37 AM |
@Lululukas
A very unnecessary part of the script, I know, and I should probably omit it. |
|
|
| Report Abuse |
|