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)