while true do if script.Parent.Parent.Value.Value == true then script.Parent.ParticleEmitter.Enabled = false script.Parent.Transparency = 1 elseif script.Parent.Parent.Value.Value == false then script.Parent.Transparency = 0 script.Parent.ParticleEmitter.Enabled = true if script.Parent.Script2 == nil then local a = script.Parent.Folder.Script2:Clone() a.Parent = script.Parent end end wait(0.01) end
I'm trying to have a value in script.Parent.Parent.Value that decides whether this part will be transparent or not. It's not working. If it helps, the Value is in game.Workspace and the part trying to use the value in game.Workspace.Part. The if statement within the elseif statement is meant to find out if there's already a script called Script2 in the parent of the folder its in. If it doesn't exist, it is meant to clone the script and put it inside the folder's parent. Can anyone explain to me why this is not working correctly?