Basically, I want a character to be having a cup, and then when you clicked on a machine, the cup, it will change the name and the appearance. This is what I have so far.

script.Parent.ClickDetector.MouseClick:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if not player then print("Not a player.") else 
local Tool = player.Backpack:FindFirstChild("Cup") 
if Tool then
Tool.Name = "Cream"
Tool.Cream.Transparency = 0
end
 end
end)

I tried using the script and local script but none of them are working.

2 comments

1

Use Lue Code block. I can't understand your code.

0

Fixed, try now.