What I am trying to achieve: Hello! I am trying to achieve a simple Gui for a cafe. When this part is clicked, it opens a size choosing GUI. The Gui works perfectly however its the tool that is the problem.
I do not want the tools to be name “Small Cup” I just want them to be named “Cup”
I have 3 different sizes. Small, Medium, and Large. I want all of them to have the name “Cup”
But, to tell the difference between them I want to have a ToolTip that says this. https://gyazo.com/13b7332650f334542ca6eea6f63cf7f3
The issue is my script. I do not know how to make them all have the same name “Cup” and have the tool tip to show the difference between the sizes of the cups.
this video is exactly what im trying to achieve. however, i wan the tool tip name to change to “Medium” when the medium button is pressed.https://gyazo.com/322148d9a4f7a568af86914edf2e1abe (Skip to 15 seconds.)
heres my script:
local CupsPart = script.Parent
local ClickDetector = CupsPart.ClickDetector
local Lighting = game:GetService("Lighting")
local SmallCupEvent = game.ReplicatedStorage.SmallCupEvents
local MediumCupEvent = game.ReplicatedStorage.MediumCupEvents
local LargeCupEvent = game.ReplicatedStorage.LargeCupEvents
ClickDetector.MouseClick:Connect(function(player)
local PlayerGui = player.PlayerGui
local CupSize = PlayerGui.CupSize
CupSize.Enabled = true
end)
SmallCupEvent.OnServerEvent:Connect(function(player)
local backpack = player.Backpack
local Cup = game.Lighting.Cup
local SmallCupClone = Cup:Clone()
SmallCupClone.Parent = backpack
end)
MediumCupEvent.OnServerEvent:Connect(function(player)
local backpack = player.Backpack
local Cup = game.Lighting.Cup
local MediumCupClone = Cup:Clone()
MediumCupClone.Parent = backpack
end)
LargeCupEvent.OnServerEvent:Connect(function(player)
local backpack = player.Backpack
local Cup = game.Lighting.Cup
local LargeCupClone = Cup:Clone()
LargeCupClone.Parent = backpack
end)
How can I get the tooltip name to change depending on the Cup size chosen?