llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
|
| 29 Nov 2014 08:35 AM |
local config = { object = script.Parent, debris=game:GetService("Debris"), creator = script.Parent:WaitForChild("creator"), }; config.object.Touched:connect(function(hit) if hit and hit~=nil and hit.Parent~=nil then local h=hit.Parent:FindFirstChild("Humanoid"); local t=hit.Parent:FindFirstChild("Torso"); if h~=nil and t~=nil then if config.creator.Value and config.creator.Value~=nil and t:FindFirstChild("FireWeld") then local plr=game.Players:GetPlayerFromCharacter(hit.Parent); if plr then if plr==config.creator.Value then return; end end h:TakeDamage(5); elseif (config.creator.Value and config.creator.Value~=nil and t:FindFirstChild("FireWeld") == nil) then local plr=game.Players:GetPlayerFromCharacter(hit.Parent); if plr then if plr==config.creator.Value then return; end end local d = script.death:Clone(); d.creator.Value = config.creator.Value; d.Parent = t; d.Disabled = false; local p=Instance.new("Part"); p.Name="Effect"; p.BrickColor=BrickColor.new("Pastel light blue"); p.FormFactor="Custom"; p.Size=Vector3.new(2,2,2); p.Transparency=1; p.CanCollide=false; p.TopSurface="Smooth"; p.BottomSurface="Smooth"; local f = Instance.new("Fire"); f.Color=Color3.new(0,.2,.49); f.Size=15; f.Heat=25; f.SecondaryColor=Color3.new(0,.2,.49) f.Parent=p; local cf=CFrame.Angles(0,math.pi*2*math.random(),.5*math.random()); p.CFrame=t.CFrame*cf; local w=Instance.new("Motor"); w.Name="FireWeld"; w.Part0=t; w.Part1=p; w.C0=CFrame.Angles(0,math.pi*2*math.random(),.5*math.random()); w.Parent=t; config.debris:AddItem(p,8); p.Parent=workspace; h.WalkSpeed=9;
wait(6) if h then h.WalkSpeed=16; end if p and p~=nil then p:Destroy(); end end config.object:Destroy(); end end end) wait(.8); config.object:Destroy();
9+10 is not 21, IT IS 20! |
|
|
| Report Abuse |
|
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
|
| 29 Nov 2014 08:44 AM |
b
read the bottom bit
9+10 is not 21, IT IS 20! |
|
|
| Report Abuse |
|
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
|
| 29 Nov 2014 09:00 AM |
b
9+10 is not 21, IT IS 20! |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2014 09:02 AM |
"if p and p~=nil then" Wow. You are doing the same thing twice. That is horrible.
Just do "if p then".
Also, there is nothing wrong with the walkspeed changing bit. |
|
|
| Report Abuse |
|
|
llcoolj03
|
  |
| Joined: 20 Nov 2011 |
| Total Posts: 6135 |
|
|
| 29 Nov 2014 09:21 AM |
Sorry it still does not work.
9+10 is not 21, IT IS 20! |
|
|
| Report Abuse |
|
|