H// Asking for help with UI

im trying to change text in a UI its not working and i dont know why?
any advice is greatly beloved

local MarketplaceService = game:GetService("MarketplaceService")

local TweenService = game:GetService("TweenService")

local Players = game:GetService("Players")

local localPlayer = Players.LocalPlayer

------------// UI Varibles

local ChatFrame = script.Parent.Main.Chatbubble

local BuyButton = ChatFrame.Main.TextButton

local Price = ChatFrame.Main.Price

local Desc = ChatFrame.Main.Description

local ShopFrame = script.Parent.Main.ScrollingFrame

------------// UI items

local Item1 = ShopFrame.ItemOne

local Item2 = ShopFrame.ItemTwo

local item3 = ShopFrame.ItemThree

local Item4 = ShopFrame.ItemFour

------------// DescTables

local LifeTimePass = "Buy this lifetime pass to use the airship! it may cost more but its has more value!"

local MushroomStew = "Some Mushroom stew my grandma used to make! Good when your in a pinch and need food fast!"

local Insanerank = "Huh This strange tome is for sale? I found it in a cave and I need money and I don't need it so...."

local ColorVile = "I found a vine near the old astroid that was dripping a weird black thing, so I botteled it to make money"

local StaffRank = "Want to pass applications fast! Buy this! It gives you a TOTALY legit martyer rank!"

-------------------------------------------------------------------------

Item2.Main.MouseEnter(function()

print("Print 2 CLicked")

Desc.Text = MushroomStew

Price.Text = "50"

end)

Item1.Main.MouseEnter(function()

print("Item1 Clicked")

Desc.Text = LifeTimePass

Price.Text = "200"

end)
1 Like

“print(“Print 2 CLicked”)”

Let’s assume that you are making it change the Text after clicking it.

The property you are using is “MouseEnter”, this property only detects when the player passes something over the button

And you haven’t hooked them up to a function.

Item2.Main.MouseButton1Click:Connect(function()  -- MouseButton1Click / MouseEnter:Connect(function)
	print("Print 2 Clicked") -- PrintClicked in: MouseButton1Click

	Desc.Text = MushroomStew
	Price.Text = "50"
end)

Item1.Main.MouseButton1Click:Connect(function()  -- MouseButton1Click / MouseEnter:Connect(function)
	print("Item1 Clicked") -- PrintClicked in: MouseButton1Click

	Desc.Text = LifeTimePass
	Price.Text = "200" --tostring()
end)
1 Like

Thank you so much!
I was tired and i see how little information i provided that was so hopefull!

1 Like