Continously Changing ToolTip

Hi, I’m making a “drink making system” or cooking system, whatever you call it.

I’m making a ProximityPrompt to put ice in the cup the player is holding. When triggering the “put ice in cup” ProximityPrompt it does exactly that, but does it for every new cup cloned in the player’s backpack as well as the current one.

Video explanation;

Code:

script.Parent.Triggered:Connect(function(plr)
	if plr.Character:FindFirstChild("Small Cup") then
		
		if plr.Character['Small Cup'].ToolTip == "Empty Cup" then
			plr.Character['Small Cup'].ToolTip = "Cup w/ ice"
		end
	end
	
	if plr.Character:FindFirstChild("Medium Cup") then
		
		if plr.Character['Medium Cup'].ToolTip == "Empty Cup" then
			plr.Character['Medium Cup'].ToolTip = "Cup w/ ice"
		end
	end
	
	if plr.Character:FindFirstChild("Large Cup") then
		
		if plr.Character['Large Cup'].ToolTip == "Empty Cup" then
			plr.Character['Large Cup'].ToolTip = "Cup w/ ice"
		end
	end
end)

In which prox is this script parented to?

Hmm, Try this

local MediumCup = game.ReplicatedStorage:WaitForChild("Medium Cup")
script.Parent.Triggered:Connect(function(player)
 local backpack = player.Backpack 
local NewCup = MediumCup:Clone()
NewCup.Parent = backpack

end)


 

The “put ice” ProximityPrompt.

This is more likely an issue related to the cup box which is giving out the cup tools.

Boolean the player equipping the tool. True, if they’ve equipped the empty cup, or false if they unequip. If the function is triggered and the stored boolean is false, nothing happens, else, it detects the name just as it has been, but without regard of the inventory itself, but the equipped tool instead.