Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to get rid of models when intermission is on?

So I was trying to code an intermission script, where if if it says Intermission: in the TextLabel, then it would clear all tanks. But for some reason, the script doesn't do as I thought. Any help Appreciated. Thanks!

while true do
local Text = game.StarterGui.ScreenGui.TextLabel.Text
if Text:find("Intermission:") then
local table = game.Workspace:GetChildren()
for i,v in pairs (table) do
    if v.Name == "tank" then
       v:Destroy()
    end
end

end


end

1 answer

add a script in workspace, name it aaa (but why), should look like this

while true do
	wait(0)
	local aaa = workspace:FindFirstChild("tank")
	if aaa then
		p = script.delete:Clone()
		p.Parent = aaa
		p.Disabled = false
	end
end

next, add another script whose parent is the previous script, name it "delete", disable both:

script.Parent:Destroy() --doesnt delete the script lol

and do this to ur game script, idk how to explain lol

--when intermission begins
workspace.aaa.Disabled = false


--when intermission ends
workspace.aaa.Disabled = true

hope ur game doesn't break

3 comments

0

i thought you knew what i meant. what i wanted to do is delete the tanks when the people are in intermission, but in your script it doens't show that if it is intermission, then it happens

0

??

0

now im a bit confused lol

This discussion is preserved as it was. New answers, comments, and votes are closed.