How can I make it?

I have a cup that has transparent coffee drink in it and by placing it in coffee machine makes it visible.

In that cup model there is drinking animation script and it works even there is no drink in it.

My question is how can I make that this drinking script is disabled, but when there is coffee drink in it, that script enables.

(Coffee machine changes cup name from “Cup” to “Coffee”)

Instead of disabling and enabling the script, have it where it checks if there is any ‘Coffee’ inside of it. If there is, play animation and other jazz.

So basically

local coffee = script.Parent -- Location of the Coffee of course

if coffee.Visible then 
    --Your Code Here
end

I will check it once I get home

I used coffee.Transparency == 0 since .Visible didn’t work for me

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.