I’m trying to make a tornado that goes in a path and back using body position but the output says I’m attempting to index nil with Position on line 19. I’ve tried messing with primary part and the primary part itself but it hasn’t worked.
local Tornado = workspace.TornadoModel
local Traveling = workspace.TravelingPoints:GetChildren()
local T1 = Traveling.TravelingPoint1
local T2 = Traveling.TravelingPoint2
local T3 = Traveling.TravelingPoint3
Tornado.HitBox.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Sit = true
task.wait(0.125)
hit.Parent.Humanoid.Health = 0
end
end)
local bodyPos = Instance.new("BodyPosition")
bodyPos.Parent = Tornado
while true do
Tornado.TornadoPart.CFrame = Tornado.TornadoPart.CFrame * CFrame.Angles(0,math.rad(15),0)
bodyPos.Position = T1.Position
task.wait(1)
bodyPos.Position = T2.Position
task.wait(1)
bodyPos.Position = T3.Position
task.wait(1)
bodyPos.Position = T2.Position
end