|
| 23 Sep 2012 10:11 AM |
This script is part of a bigger script, and even when I hit an anchored part it gives me a point. When it prints it says it is not anchored but when I check the item it hits it is...
e.Hit:connect(function(hit) if not hit.Parent:FindFirstChild("Humanoid") and not hit.Parent.Parent:FindFirstChild("Humanoid") and hit.Anchored == false then --Problem line
print(hit.Anchored, hit.Name)--Problem line
char = game.Players:findFirstChild(Tool.Parent.Name)
if char and hit.TopSurface ~= 0 then char.leaderstats.Points.Value = char.leaderstats.Points.Value +1 end
hit:BreakJoints() hit.BackSurface = 0 hit.BottomSurface = 0 hit.FrontSurface = 0 hit.LeftSurface = 0 hit.RightSurface = 0 hit.TopSurface = 0
hit.Velocity = ((hit.Position - e.Position).unit * 100) + Vector3.new(0,-100,0) debris:AddItem(hit, 4) elseif hit.Parent:FindFirstChild("Humanoid") and(hit.Position - Tool.Parent.Torso.Position).magnitude < 7 then hit.Parent.Torso.Velocity = ((hit.Parent.Torso.Position - e.Position).unit * Vector3.new(250,0,250)) + Vector3.new(0,Tool.jump.Value,0) end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Sep 2012 10:52 AM |
e.Hit:connect(function(hit)???
Touched |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2012 10:57 AM |
e might be an explosion...
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Sep 2012 11:00 AM |
I just pwned Dark...
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2012 11:00 AM |
Although, I never seen you define the explosion(e = Instance.new("Explosion",game.Workspace)).
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Sep 2012 11:09 AM |
Oh, :3.
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|
| |
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
| |
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 23 Sep 2012 11:53 AM |
@Breu He said it was not an error, Learn to pay attention ;) |
|
|
| Report Abuse |
|
|
| |
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 23 Sep 2012 12:02 PM |
if not (hit.Parent:FindFirstChild("Humanoid")) and not ( hit.Parent.Parent:FindFirstChild("Humanoid")) and not (hit.Anchored) then ? |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2012 12:04 PM |
| Nope. Still gave me a point. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Sep 2012 12:46 PM |
e.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil and hit.Anchored == false then --Problem line
print(hit.Anchored, hit.Name)--I don't think you can print hit.Anchored, that'll return nil
char = game.Players:findFirstChild(Tool.Parent.Name)
if char and hit.TopSurface ~= 0 then char.leaderstats.Points.Value = char.leaderstats.Points.Value +1 end
hit:BreakJoints() hit.BackSurface = 0 hit.BottomSurface = 0 hit.FrontSurface = 0 hit.LeftSurface = 0 hit.RightSurface = 0 hit.TopSurface = 0
hit.Velocity = ((hit.Position - e.Position).unit * 100) + Vector3.new(0,-100,0) debris:AddItem(hit, 4) elseif hit.Parent:FindFirstChild("Humanoid") and(hit.Position - Tool.Parent.Torso.Position).magnitude < 7 then hit.Parent.Torso.Velocity = ((hit.Parent.Torso.Position - e.Position).unit * Vector3.new(250,0,250)) + Vector3.new(0,Tool.jump.Value,0) end end) |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2012 12:47 PM |
I'm being stupid:
e.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil and hit.Anchored == false then --Problem line
print(hit.Anchored .. hit.Name)--I don't think you can print hit.Anchored, that'll return nil
char = game.Players:findFirstChild(Tool.Parent.Name)
if char and hit.TopSurface ~= 0 then char.leaderstats.Points.Value = char.leaderstats.Points.Value +1 end
hit:BreakJoints() hit.BackSurface = 0 hit.BottomSurface = 0 hit.FrontSurface = 0 hit.LeftSurface = 0 hit.RightSurface = 0 hit.TopSurface = 0
hit.Velocity = ((hit.Position - e.Position).unit * 100) + Vector3.new(0,-100,0) debris:AddItem(hit, 4) elseif hit.Parent:FindFirstChild("Humanoid") and(hit.Position - Tool.Parent.Torso.Position).magnitude < 7 then hit.Parent.Torso.Velocity = ((hit.Parent.Torso.Position - e.Position).unit * Vector3.new(250,0,250)) + Vector3.new(0,Tool.jump.Value,0) end end) |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2012 02:22 PM |
| When you print a bool it prints true or false. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Sep 2012 03:01 PM |
Yes it does.
http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information. |
|
|
| Report Abuse |
|
|