I'm working on a silent hill sort of game and I'm struggling to activate the transition from the Fog World to the Otherworld. I store every part of the transition in one folder for easier access for the script. Each transitioning parts have a Particle Emitter named "P" which needs to be activate first and all at once, and then a loop to make the parts transparent all at the same time. Finally turn off the emitters at the same time.
So far I tried to two things, both equally bad.
local TransitionParts = game:GetService("Workspace")["Transition parts"]:GetChildren()
local function Transition()
local g = 0
print("Activated")
wait(1)
warn("Creepy Siren Noises")
wait(3)
--First attempt
--[[
for i,v in pairs(TransitionParts) do
v.P.Enabled = true
for g = 0, 1, .1 do
v.Transparency = g
print(g)
wait(0.35)
end
v.P.Enabled = false
end--]]
--Second attempt
for _,v in pairs(TransitionParts) do
v.P.Enabled = true
end
for _,v in pairs(TransitionParts) do
g = g + 1
TransitionParts.Transparency = g --Doesn't even work
print(g)
wait(0.35)
end
for _,v in pairs(TransitionParts) do
v.P.Enabled = false
end
print("Complete")
end
script.Parent.ClickDetector.MouseClick:Connect(Transition)
I know its messy, I'm trying to get it to work before I can clean it up some.
At first I tried doing it all in one loop but did one part at a time, then tried 3 seperate loops but for whatever reason the transparency change isn't working nor can the 3rd loop find P.
I'm probably missing something really simple and just over thinking it.

1 comment
Do you want to change the transparency of every part at the same time? Or one at a time.