Script not working

Hello!

When you put the cup in the machine it makes Lemonade, but the color change isn’t working.

Organization:
image
The thing inside the Handle is just a WeldConstraint.

Script In Machine:

local TouchPart = Machine.TouchPart

TouchPart.Touched:Connect(function(PartThatTouched)
	local Cup = PartThatTouched.Parent
	local Character = Cup.Parent

	Cup.Parent = Character
	Cup.Handle.Color = Color3.new(245,245,101)
	Cup.Name = "Lemonade"
end

Thanks!

1 Like

You should use:

Color3.fromRGB 

Color3.new() only has a range between 0 - 1 not 0 - 255

That did not work. It still did the same thing.

Try parenting the Handle with a part, making the part invisible, and then naming the part Handle

If it is a union, check if the UsePartColor property is enabled.

That works, but now I have a new issue.

I have no idea how, but the straw and lid are inside of the tool, but I can only hold the cup part.

Hi, if you weld it that should fix the issue.