Cup script not working

Actually, you just need to change Part.Character to v.Character and I think it would work.

Also, is your tool named “Drink”?

OK, i’ll change it to v.Character

My tool is named “PlasticCup”

Also when I do “v.Character” it shows a unknown global error.

That’s because you have two variables named “v”.

Change v.Parent:IsA("PlasticCup") to v.Parent:IsA("Tool") and change v.Parent.name == "Drink" to v.Parent.Name == "PlasticCup" and now it will work with the name.

2 Likes

Yep, that worked! I found out what was wrong with it. "v.Name==“Handle” was changing the color of the Handle of the tool, so I just changed "v.Name=“Handle” To "v.Name==“Drink”.

Thanks a lot man!

Is there anyway that I could add anything else to the script? Like is there anyway to make the drink part, and a straw visible at the same time?

That doesn’t go in scripting support. It goes in building support or something.