Hello!
So I’m having this odd issue where a model called “TornadoStarter” randomly get’s destroyed out of nowhere.
I have only have scripts that even has the model “TornadoStarter” inside of them.
They are all ServerScripts.
EDIT: Script 2 is made to prevent this from happening, but it is not working.
Script 1:
local TPs = game.Workspace.TPs:GetChildren()
local Maps = game.ServerStorage.Maps:GetChildren()
local Spawns = game.Workspace.Spawns:GetChildren()
local Disasters = game.ReplicatedStorage.Disasters:GetChildren()
local ExtremeDisasters = game.ReplicatedStorage.ExtremeDisasters:GetChildren()
local length
local roundTimer = 0
local sFold = game.Workspace.MusicAndSounds
local sounds = sFold:GetChildren()
local strikes = sFold.LightningStrikes:GetChildren()
local lightning = game.Lighting
while true do
roundTimer = roundTimer + 1
print(roundTimer)
lightning.ClockTime = math.random(0,24)
wait(5)
local rMapClone = Maps[math.random(1, #Maps)]:Clone()
wait(5)
rMapClone.Parent = game.Workspace.ShownMaps
game.ReplicatedStorage.MapGUI:FireAllClients()
wait(5)
for _, player in ipairs(game.Players:GetPlayers()) do
local rLocation = TPs[math.random(1, #TPs)]
local character = player.Character or player.CharacterAdded:Wait()
if character then
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
humanoidRootPart:PivotTo(rLocation.CFrame)
end
end
end
wait(40)
local rDisaster = Disasters[math.random(1, #Disasters)]
local rDisasterClone = rDisaster:Clone()
local rExtreme = ExtremeDisasters[math.random(1, #ExtremeDisasters)]
local rExtremeClone = rExtreme:Clone()
if roundTimer == 10 then
roundTimer = 0
rExtremeClone.Parent = game.ReplicatedStorage.SelectedDisasters
else
rDisasterClone.Parent = game.ReplicatedStorage.SelectedDisasters
end
local shortStrings = {"Earthquake", "Hurricane", "Waterspouts", "Wind Chaos", "Tornado"}
local longStrings = {"Fire", "Thunderstorm"}
for _, str in ipairs(shortStrings) do
if rDisasterClone.Name == str then
length = 80
break -- Exit the loop once a match is found
end
end
for _, str in ipairs(longStrings) do
if rDisasterClone.Name == str then
length = 130
break -- Exit the loop once a match is found
end
end
wait(1)
game.ReplicatedStorage.Warn:FireAllClients()
wait(length)
for _, waterspout in ipairs(game.Workspace.ClonedWaterspouts:GetChildren()) do
if waterspout then
waterspout:Destroy()
end
end
game.Workspace.TornadoStarter.Particle.Anchored = true
game.Workspace.TornadoStarter.Hitbox.Anchored = true
game.Workspace.TornadoStarter.Particle.ParticleEmitter.Enabled = false
rDisasterClone:Destroy()
rExtremeClone:Destroy()
rMapClone:Destroy()
for _, player in ipairs(game.Players:GetPlayers()) do
local rSpawn = Spawns[math.random(1, #TPs)]
local character = player.Character or player.CharacterAdded:Wait()
if character then
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
humanoidRootPart:PivotTo(rSpawn.CFrame)
end
end
end
game.Workspace.Cloud.Transparency = 1
game.Lighting.FogEnd = 10000
game.Lighting.FogColor = Color3.new(0.65, 0.65, 0.65)
game.Lighting.Brightness = 2
game.Workspace.DisasterIsland.Baseplate1.CanTouch = false
game.Workspace.DisasterIsland.Baseplate2.CanTouch = false
game.Workspace.Ocean.CanTouch = false
for _,v in pairs(game.Workspace:GetChildren()) do
if v and (v.Name == "StrikePart" or v.Name == "LightningPLR" or v.Name == "ExplosionPart") then
v:Destroy()
end
end
wait(0.1)
for _, player in ipairs(game.Players:GetPlayers()) do
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
if character then
humanoid.Health = 0
end
end
for _,sound in pairs(sounds) do
if sound and sound:IsA("Sound") then
sound:Stop()
end
end
for _,strike in pairs(strikes) do
if strike and strike:IsA("Sound") then
strike:Stop()
end
end
end
Script 2:
local tornadoStarter = game.Workspace:FindFirstChild("TornadoStarter")
local tornadoH = game.Workspace.TornadoStarter.Hitbox
local tornadoPar = game.Workspace.TornadoStarter.Particle
local tornadoY = game.Workspace.TornadoStarter.Hitbox.Position.Y
local tornadoY2 = game.Workspace.TornadoStarter.Particle.Position.Y
local spouts = game.Workspace.Waterspouts:GetChildren()
game:GetService("RunService").Heartbeat:Connect(function()
if tornadoStarter then
local torX = game.Workspace.TornadoStarter.Hitbox.Position.X
local torZ = game.Workspace.TornadoStarter.Hitbox.Position.Z
local torX2 = game.Workspace.TornadoStarter.Particle.Position.X
local torZ2 = game.Workspace.TornadoStarter.Particle.Position.Z
tornadoH.Position = Vector3.new(torX,tornadoY,torZ)
tornadoPar.Position = Vector3.new(torX2,tornadoY2,torZ2)
end
end)
Script 3:
local Debounce = false
local TornadoStarter = game.Workspace.TornadoStarter
local build = script.Parent
local TS = game:GetService("TweenService")
local MusicAndSounds = game.Workspace.MusicAndSounds
local Debounce2 = false
local Debounce3 = false
local function detectTouch(otherPart)
if otherPart and otherPart:IsA("Part") then
if otherPart.Name ~= "Handle" and otherPart.Name ~= "FloorBase" then
if otherPart.Anchored == false then
if not Debounce2 then
otherPart.AssemblyLinearVelocity = Vector3.new(math.random(-65, 65),130,math.random(-60, 60))
for _,v in ipairs(otherPart:GetChildren()) do
if v then
if (v:IsA("Weld") or v:IsA("WeldConstraint")) then
v:Destroy()
end
end
end
wait(0.5)
otherPart.AssemblyLinearVelocity = Vector3.new(0,0,0)
end
end
end
end
end
local function getRandomPosition()
local Dirs = game.Workspace.WaterspoutDirections:GetChildren()
local rInd = math.random(1, #Dirs)
local rDir = Dirs[rInd]
return rDir.Position
end
local function getStuff()
while Debounce do
if build.Parent == game.Workspace.ShownMaps then
-- Replace this with the actual parts you want to modify
local part1 = TornadoStarter.Particle
local part2 = TornadoStarter.Hitbox
local randomPosition = getRandomPosition()
local tI = TweenInfo.new(
8, -- Duration
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0, -- Repeat count (0 for no repeat)
false, -- Reverses (false for no reverse)
0.1 -- Delay between repeats
)
-- Create a new Tween for the part's Position property
local tween1 = TS:Create(part1, tI, {Position = randomPosition})
local tween2 = TS:Create(part2, tI, {Position = randomPosition})
-- Play the Tween
tween1:Play()
tween2:Play()
-- Connect to the completed event to reset Debounce
wait(8)
end
end
end
local function StartTornado()
game.Lighting.Brightness = 1
game.Lighting.FogEnd = 200
game.Lighting.FogColor = Color3.new(0.521599, 0.599084, 0.660639)
game.Workspace.Cloud.Transparency = 0
MusicAndSounds.Tornado:Play()
TornadoStarter.Particle.ParticleEmitter.Enabled = true
TornadoStarter.Particle.Anchored = false
TornadoStarter.Hitbox.Anchored = false
getStuff()
end
local function ConnectToTornado()
local TornadoEvent = game.ReplicatedStorage.SelectedDisasters:FindFirstChild("Tornado")
local WindChaosEvent = game.ReplicatedStorage.SelectedDisasters:FindFirstChild("Wind Chaos")
if (TornadoEvent and TornadoEvent:IsA("RemoteEvent")) or (WindChaosEvent and WindChaosEvent:IsA("RemoteEvent")) then
if script.Parent.Parent == game.Workspace.ShownMaps then
if not Debounce then
Debounce = true
StartTornado()
end
end
end
end
game["Run Service"].Heartbeat:Connect(function()
ConnectToTornado()
end)
TornadoStarter.Hitbox.Touched:Connect(detectTouch)
This is probably the weirdest bug I’ve ever had…
Anyways, any help is appreciated!