So I have a script that when (h) touches the brick, the child of (h), Drink1 should become 0.1 transparency but the script works but it does not make the brick turn 0.1 transparent. Why?
function tch(h) if (h.Parent.Name == "Drink1") then h.Parent.Name = "HamDink" --Edit this to the name of the drink h.Parent.Transparency = 0.1 -- change this to the transparency script.Parent.Parent.Spill.Transparency = 0.1 wait(0.5) script.Parent.Parent.Spill.Transparency = 1 --no touchy end end script.Parent.Touched:connect(tch)
If "H" is a part, then "H" will have to be transparent. It looks like you are trying to make a model transparent, so try this.
function tch(h) if (h.Parent.Name == "Drink1") then h.Parent.Name = "HamDink" --Edit this to the name of the drink h.Transparency = 0.1 -- change this to the transparency script.Parent.Parent.Spill.Transparency = 0.1 wait(0.5) script.Parent.Parent.Spill.Transparency = 1 --no touchy end end script.Parent.Touched:connect(tch)