Hiya guys, this is a bit of a stupid post, but im using an old tornado script from a different project, i tested that project, it works fine, but when i put it into my new project it just doesnt work at all? no erros or anything so im just really dumbfounded
To add onto that, In the place that works i copied it into something else, (another part) that doesnt work either. i dont know if im being blind but jesus christ i dont know what the issue is
local tor = script.Parent
local debounce = false
local attackrange = 60
local Ragdoll = require(game.ServerScriptService.Ragdoll)
local near = coroutine.resume(coroutine.create(function()
while wait() do
local region = Region3.new(
Vector3.new(tor.Position.X - tor.Size.X/2 - attackrange, tor.Position.Y - tor.Size.Y/2 - attackrange, tor.Position.Z - tor.Size.Z/2 - attackrange),
Vector3.new(tor.Position.X + tor.Size.X/2 + attackrange, tor.Position.Y + tor.Size.Y/2 + attackrange, tor.Position.Z + tor.Size.Z/2 + attackrange)
)
local parts = workspace:FindPartsInRegion3(region)
for i,p in pairs(parts) do
if p.Name == "HumanoidRootPart" then
if not p:FindFirstChild("TornadoSuckingForce") then
local sitting = true
--p.Parent.Humanoid.Sit = true
Ragdoll:Ragdoll(p.Parent)
local bp = Instance.new("BodyPosition")
bp.Name = "TornadoSuckingForce"
p.Parent.Humanoid.Sit = true
bp.MaxForce = Vector3.new(2000 * p:GetMass(), 2000 * p:GetMass(), 2000 * p:GetMass())
bp.Parent = p
-- this will let the parts handle itself, instead of a whole script handling everything to reduce lag
local torvalue = Instance.new("ObjectValue")
torvalue.Name = "WhichTornado"
torvalue.Value = tor
torvalue.Parent = p
local scr = script.SuckingScript:Clone()
scr.Parent = p
scr.Disabled = false
-- extra stuff
local bav = Instance.new("BodyAngularVelocity")
bav.Name = "SuckingRotation"
bav.MaxTorque = Vector3.new(4000 * p:GetMass(), 4000 * p:GetMass(), 4000 * p:GetMass())
bav.AngularVelocity = Vector3.new(math.random(-5,-1), math.random(-5,-1), math.random(-5,-1))
bav.Parent = p
spawn(function()
local endvel = Instance.new("BodyForce")
endvel.Force = Vector3.new(math.random(-600,600),math.random(10,200),math.random(-600,600))
wait(10)
sitting = false
bp:Destroy()
bav:Destroy()
endvel.Parent = p
wait(1)
endvel:Destroy()
wait(4)
Ragdoll:UnRagdoll(p.Parent)
end)
end
end
end
end
end))
--tor.Touched:connect(onTouched)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.