So I was wondering how I could possibly change the brick color of a drink in it When put in the machine?? This is the script I have right now? Any help?
function tch(h) if (h.Parent.Name == "Cup") then script.Parent.Sound:Play() game.Workspace.ChocolateMachine.Spill.Transparency = 0 h.Parent.Name = "Chocolate Ice Cream" wait(0.5) game.Workspace.ChocolateMachine.Spill.Transparency = 1 h.Parent.Drink.BrickColor = script.Color.Value h.Parent.Drink.Transparency = 0 end end script.Parent.Touched:connect(tch)
So I have my Brick named Drink when a cup get's touched on the part Brick It will change a brick in the cup that was touched to a certain color and the spill is the ice cream dropping
I want it to change the color of the drink in workspace when playing the game so If someone puts their cup in the machine their Drink will turn brown or something?
-Glassify
To set the color of a part, set the BrickColor of the part to BrickColor.new("Cocoa")
h.Parent.Drink.BrickColor = BrickColor.new("Cocoa")
Replace Cocoa with the name of whatever BrickColor you want, Cocoa is just my example/recommendation.