So an issue im currently having with my script is that when you remove everything past the wait(5) all the plates disappear at once like it should but when you add everything after the script breaks and only one of the plates disappears. Why is this and how can I fix this?
-- Plate Variables
local redplate = script.Parent.Plate.Red
local blueplate = script.Parent.Plate.Blue
local greenplate = script.Parent.Plate.Green
local yellowplate = script.Parent.Plate.Yellow
local platemodel = script.Parent.Plate
local platetable = {blueplate, greenplate, yellowplate, redplate}
--Simon Variables
local redsimon = script.Parent.Simon.Red1
local bluesimon = script.Parent.Simon.Blue1
local yellowsimon = script.Parent.Simon.Yellow1
local greensimon = script.Parent.Simon.Green1
--Main Script
while true do
wait(10)
r = platetable[math.random(#platetable)]
r.Parent = script.Parent.PlateStorage
for i, v in pairs(platemodel:GetDescendants()) do
if v:IsA("BasePart") then
v.Transparency = 1
v.CanCollide = false
wait(5)
v.Transparency = 0
v.CanCollide = true
end
end
end
