Tornado script broken

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    A nice, beautiful tornado! (ngl mine looks pretty horrible)

  2. What is the issue? Include screenshots / videos if possible!
    It wont notice the player

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    None.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

while wait() do
	workspace.Tornado.Position = Vector3.new(math.random(-900, 900), 319.997, math.random(-900, 900))
	workspace.Tornado.Attachment.Outer.Enabled = true
	workspace.Tornado.Attachment.Inner.Enabled = true
	print("Descending")
	wait(5)
	print("Descended")
	for i = 1, 2500 do
		wait(0.01)
		for e, obj in pairs(workspace.Tornado:GetTouchingParts()) do
				obj.Velocity = Vector3.new(0, 100, 0)
				if obj.Parent:FindFirstChildOfClass("Humanoid") then
					obj.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(10)
				end
		end
	end
	workspace.Tornado.Attachment.Outer.Enabled = false
	workspace.Tornado.Attachment.Inner.Enabled = false
end
1 Like

:GetTouchingParts() is kind of bad.

I’m assuming this is a server script. Instead of doing a for loop for the tornado. Do:

workspace.Tornado.Touched:Connect(function(part)
if part.Parent:FindFirstChild("HumanoidRootPart") do --checks if its a human
--rest of ur code
end

ehhhh, i NEED the loop part. if i didn’t loop, all of the waits would be put to waste. the player would be flung to the sky in shock for being in the part.

Why can’t you remove the waits? Also it is doing the same for loop 2500 times, with each waiting 0.01. This makes it do every single loop in around 25 seconds. Maybe you are getting there too late.

i want the tornado to descend fully before everything happens.

Descend? Also why are you changing the Vector3 of obj to 0, 100, 0

i am not. it is a random position. also why are you putting so little help into this? plus you should know how tornados work.

I am trying to help. I am just having trouble understanding your code. Sorry if it seems like I am wasting your time.

im gonna get a video of the game for you to see.

@Earthraphobic2
robloxapp-20240217-2209319.wmv (2.7 MB)
i know it seems bad, but im still working on it.