markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
|
| 16 Nov 2014 06:54 PM |
you know the roblox vacuum that suck up anything your near well I want to config it so it doesn't effect players in other words I want it to effect everything except players and I cant find out how but I think this part of the tools script controls what it can suck up
local suckableParts = game.Workspace.Game.WaddleDees:FindPartsInRegion3(suckRegion, Tool.Parent,50)
if anyone can can some one change this so it doesn't effect players |
|
|
| Report Abuse |
|
|
markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
|
| 16 Nov 2014 06:55 PM |
| oops take away the .WaddleDees part that was my ettempt |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 07:05 PM |
local IgnoreList = {}
for i,v in pairs(Workspace:GetChildren()) do if v:IsA("Model") and v:FindFirstChild("Humanoid") then table.insert(IgnoreList, v) end end
local suckableParts = game.Workspace:FindPartsInRegion3WithIgnoreList(suckRegion, IgnoreList, 50)
|
|
|
| Report Abuse |
|
|
markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
|
| 16 Nov 2014 07:23 PM |
now it doesn't kill the player witch it good :D but the tool still pulls the player near the tool and I think that has to do with this part
function doSuck() local plr=game.Players.LocalPlayer if plr~=nil then local radiusVec = Vector3.new(6,6,6) local handle = Tool:FindFirstChild("Handle") local hose = handle:FindFirstChild("HosePart") local hoseCFrame = hose.CFrame*CFrame.Angles(math.pi/2,0,0) local hoseTarget = hoseCFrame + hoseCFrame.lookVector*9 local suckTarget = hoseCFrame + hoseCFrame.lookVector*3 local suckPart = Instance.new("Part") suckPart.CanCollide = false suckPart.FormFactor = "Custom" --suckPart.Shape = "Ball" suckPart.Size = Vector3.new(.2,.2,.2) suckPart.CFrame = hoseTarget + Vector3.new((math.random()-.5)*10,(math.random()-.5)*10,(math.random()-.5)*10) suckPart2 = suckPart:Clone() suckPart2.CFrame = hoseTarget + Vector3.new((math.random()-.5)*10,(math.random()-.5)*10,(math.random()-.5)*10) debris:AddItem(suckPart,3) debris:AddItem(suckPart2,3) suckPart.Parent = game.Workspace suckPart2.Parent = game.Workspace |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 07:35 PM |
| That's strange, it seems to be working for me. |
|
|
| Report Abuse |
|
|
markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
|
| 16 Nov 2014 07:48 PM |
no wait I think it has to do with this part or I was supost to put the rest of the script in the beginning and the suckableparts in its normal place
local limbChance = .075 for i,v in pairs(suckableParts) do if v and v.Parent and v:IsA("BasePart") and not v:IsA("Terrain") and v:getMass() < 40 and not v:FindFirstChild("bp") then local bp = Instance.new("BodyPosition") bp.Name = "bp" bp.maxForce = Vector3.new(99999,99999,99999) bp.D = 3000 bp.P = 30000 bp.position = suckTarget.p debris:AddItem(bp,.5) local hum = v.Parent:FindFirstChild("Humanoid") if hum then if math.random() < limbChance or hum.Health == 0 then local creatorTag = Instance.new("ObjectValue") creatorTag.Value = plr creatorTag.Name = "creator" debris:AddItem(creatorTag,.5) creatorTag.Parent = hum
v:BreakJoints() bp.Parent = v debris:AddItem(v,.15) |
|
|
| Report Abuse |
|
|