I am not sure if you can change the transparency of a group, so I decided to list all of the parts within the chosen group and group them together inside of the script (The group's name in the script in "DF1")

Here is what I have come up with:

DinerFoodEmpty = script.Parent.DinerFoodEmpty
DinerFood0 = script.Parent.DinerFood0
DinerFood1 = script.Parent.DinerFood1
DinerFood2 = script.Parent.DinerFood2
DinerFood3 = script.Parent.DinerFood3
FoodSwitch = script.Parent.FoodSwitch

ClickHere = FoodSwitch.ClickHere.ClickDetector

DFE_P = DinerFoodEmpty.Plate
DF0_P = DinerFood0.Plate


DF1_C1 = DinerFood1.CheeseBurger.TopBread
DF1_C2 = DinerFood1.CheeseBurger.Tomato
DF1_C3 = DinerFood1.CheeseBurger.Cheese
DF1_C4 = DinerFood1.CheeseBurger.Beef
DF1_C5 = DinerFood1.CheeseBurger.BottomBread
DF1_F = DinerFood1.Fries.Fries
DF1_P = DinerFood1.Plate

DF1 = DF1_C1, DF1_C2, DF1_C3, DF1_C4, DF1_C5, DF1_F, DF1_P



ClickHere.MouseClick:connect(function()
	if DF1.Transparency == .9 then
		DF1.Transparency = 0
	end
end) -- Script is not finished, I just want to make sure this works before proceed on with the other food items.

When I test the game and click the translucent "ClickHere", nothing happens but "Attempt to connect failed: Passed value is not a function" in the output. Any ideas of what's wrong or how to fix?

3 comments

0

Why does your script have a bunch of values for one variable?

0

restart stoodeo

0

What do you mean by “a bunch of values”? This is one of my first times scripting and all I know is properties and light switches.