Issue

I have 2 scripts with this issue

Also the scripts have another issue

The way the script is supposed to work is it waits for a model named "hurricane" and then a part named "particles" to be replicated into workspace but then this error happens if its not replicated fast enough (and thats not what my game is supposed to do)

Other issue

Script 1:

while true do
	local hurricanewarning = script.Parent.hurricane_warning
	local hurricanewatch = script.Parent.hurricane_watch
	local hurricanestatement = script.Parent.hurricane_statement
	
	local hurricanewatchclone = hurricanewatch:Clone()
	local hurricanewarningclone = hurricanewarning:Clone()
	local hurricanestatementclone = hurricanestatement:Clone()
	
	local hwcheck = script.Parent.ScreenGui.Frame.Frame:FindFirstChild("hurricane_warning")
	local hwtcheck = script.Parent.ScreenGui.Frame.Frame:FindFirstChild("hurricane_watch")
	local hscheck = script.Parent.ScreenGui.Frame.Frame:FindFirstChild("hurricane_statement")
		
	local magnitude = (script.Parent.Position - game.Workspace:WaitForChild("hurricane"):WaitForChild("particles", math.huge).Position).magnitude
	
	if magnitude <= 10 and game.Workspace:WaitForChild("hurricane", math.huge).stormwinds.Value >= 74 and not hwcheck then
		hurricanewarningclone.Parent = script.Parent.ScreenGui.Frame.Frame
		script.Parent.Color = Color3.fromRGB(220, 20, 60)
		script.Parent.Transparency = 0
		
	elseif magnitude <= 20 and game.Workspace:WaitForChild("hurricane", math.huge).stormwinds.Value >= 74 and not hwtcheck then
		hurricanewatchclone.Parent = script.Parent.ScreenGui.Frame.Frame
		script.Parent.Color = Color3.fromRGB(255, 0, 255)
		script.Parent.Transparency = 0
		
	elseif magnitude <= 40 and game.Workspace:WaitForChild("hurricane", math.huge).stormwinds.Value >= 74 and not hscheck then
		hurricanestatementclone.Parent = script.Parent.ScreenGui.Frame.Frame
		script.Parent.Color = Color3.fromRGB(255, 255, 0)
		script.Parent.Transparency = 0
		
	elseif magnitude >= 40 then
		hurricanewarningclone:Destroy()
		hurricanewatchclone:Destroy()
		hurricanestatementclone:Destroy()
		script.Parent.Transparency = 0
	end
	wait(0.01)
end

Script 2:

while true do
	local tropicalstormwarning = script.Parent.tropical_storm_warning
	local tropicalstormwatch = script.Parent.tropical_storm_watch
	
	local tropicalstormwarningclone = tropicalstormwarning:Clone()
	local tropicalstormwatchclone = tropicalstormwatch:Clone()
	
	local tswcheck = script.Parent.ScreenGui.Frame.Frame:FindFirstChild("tropical_storm_warning")
	local tswatcheck = script.Parent.ScreenGui.Frame.Frame:FindFirstChild("tropical_storm_watch")
	
	local magnitude = (script.Parent.Position - game.Workspace:WaitForChild("hurricane"):WaitForChild("particles", math.huge).Position).magnitude
	
	if magnitude <= 10 and game.Workspace:WaitForChild("hurricane", math.huge).stormwinds.Value >= 39 and game.Workspace:WaitForChild("hurricane", math.huge).stormwinds.Value <= 73 and not tswcheck then
		tropicalstormwarningclone.Parent = script.Parent.ScreenGui.Frame.Frame
		tropicalstormwatchclone:Destroy()
		script.Parent.Color = Color3.fromRGB(178, 34, 34)
		script.Parent.Transparency = 0
	elseif magnitude <= 20 and game.Workspace:WaitForChild("hurricane", math.huge).stormwinds.Value >= 39 and game.Workspace:WaitForChild("hurricane", math.huge).stormwinds.Value <= 73 and not tswatcheck then
		tropicalstormwatchclone.Parent = script.Parent.ScreenGui.Frame.Frame
		tropicalstormwarningclone:Destroy()
		script.Parent.Color = Color3.fromRGB(240, 128, 128)
		script.Parent.Transparency = 0
	elseif magnitude >= 20 then
		tropicalstormwarningclone:Destroy()
		tropicalstormwatchclone:Destroy()
		script.Parent.Color = Color3.fromRGB(255, 255, 255)
		script.Parent.Transparency = 0
	end
	wait(0.01)
end

2 comments

0

First, I don't know what to look at in the first issue gif that is linked. The second issue obviously tells you the problem. A child called "hurricane" is never found in workspace. There is no reason for you two have multiple WaitForChilds like this nor use math.huge for it's wait parameter.

0

the thing is i have a script in serverscriptservice that randomly clones a model called "hurricane", so how would i even get past this