This question is somewhat similar to my last but my issue now is that I am unaware of how to connect my script to wait for a player to click the Click Detector in the brick to change the transparency of multiple unions to 1 instead of one union out of all of them. This may sound confusing but look at the script and I will explain in more detail:
local ClickHere = script.Parent.Parent.ClickHere
local PlateEmp = script.Parent.Parent.PlateEmp
local PlateInv = script.Parent.Parent.PlateInv
local Plate1 = script.Parent.Parent.Plate1
local Plate2 = script.Parent.Parent.Plate2
local Plate3 = script.Parent.Parent.Plate3
function click()
if PlateEmp.Transparency == 1 then
PlateEmp.Transparency = 0
Plate1.Transparency = 1
Plate2.Transparency = 1
Plate3.Transparency = 1
end
wait (2)
function click()
if PlateEmp.Transparency == 0 then
PlateEmp.Transparency = 1
Plate1.Transparency = 0
Plate2.Transparency = 1
Plate3.Transparency = 1
end
end
script.Parent.ClickDetector.MouseClick:Connect(click)
This script only contains the changing of 2 union's transparency. This script is unfinished.
When I test the game, I click the brick with the Click Detector and "PlateEmp" transparency becomes 0, just as I wanted. But then, it turns invisible and "Plate1" becomes 'un-invisible' or transparency is equal to 0 without me clicking the brick again. What am I doing wrong?
If it helps, I am trying to make a script similar to that of the food in Minnie's Diner in "Clear Skies Over Milwaukee" by Toast22A.
If you are answering, I don't mean to sound rude but can you be specific about the code or actions I need to take because I am fairly new to scripting and this is my first 'partially' working script.
