script.Parent.Touched:connect(function(h) if h.Parent.Name == "Basic Cakepop" or h.Parent.Name == "U" then h.Parent.Name = "White Cakepop" if h.Parent:FindFirstChild("drink") ~= nil then h.Parent.drink.Transparency = 0 h.Parent.drink.BrickColor = BrickColor.new("White") end end end)
I keep getting the Error "18:24:45.398 - Touched is not a valid member of Model"
Models are simply meant to organize things, as it says in the wiki. That means the model doesn’t have the properties of a part, which also means it doesn’t have the .Touched function.
You can put an invisible, non-collidable part on the model so when players touch the part, stuff happens. You can also use .magnitude I think, but I would just prefer making the invisible part.