I am makeing a shop and the ui will not show the price I have the code and have not found any issues
local plr = game.Players.LocalPlayer
local CurrentCamera = game.Workspace.Camera
local CurrentItem = 1
local Items = 12
local Next = script.Parent.Next
local Previous = script.Parent.Previous
local Close = script.Parent.Close
local Equip = script.Parent.Button
local db = false
game.ReplicatedStorage.RemoteEvents.Shop.OnClientEvent:Connect(function()
if script.Parent.Visible == false and db == false then
db = true
script.Parent.Visible = true
script.Parent.Parent.Main.Visible = false
script.Parent.Parent.TwitterCode.Visible = false
local Item = game.Workspace.Items[CurrentItem]
CurrentCamera.CameraType = Enum.CameraType.Scriptable
CurrentCamera.CameraSubject = Item.Camera
CurrentCamera.CFrame = Item.Camera.CFrame
script.Parent.Item.Text = Item.Configure.Item.Value
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
game.Players.LocalPlayer.Character.Humanoid:UnequipTools()
if plr.Items:FindFirstChild(Item.Configure.Item.Value) then
script.Parent.Button.TextLabel.Text = "Equip"
else
script.Parent.Button.TextLabel.Text = Item.Configure.Price.Value
end
end
end)
Next.MouseButton1Click:Connect(function()
CurrentItem = CurrentItem + 1
if CurrentItem > Items then
CurrentItem = 1
end
script.Parent.Parent.ClickEffect:Play()
local Item = game.Workspace.Items[CurrentItem]
CurrentCamera.CameraType = Enum.CameraType.Scriptable
CurrentCamera.CameraSubject = Item.Camera
CurrentCamera.CFrame = Item.Camera.CFrame
script.Parent.Item.Text = Item.Configure.Item.Value
if plr.Items:FindFirstChild(Item.Configure.Item.Value) then
script.Parent.Button.TextLabel.Text = "Equip"
else
script.Parent.Button.TextLabel.Text = Item.Configure.Price.Value
end
end)
Previous.MouseButton1Click:Connect(function()
CurrentItem = CurrentItem - 1
if CurrentItem < 1 then
CurrentItem = Items
end
script.Parent.Parent.ClickEffect:Play()
local Item = game.Workspace.Items[CurrentItem]
CurrentCamera.CameraType = Enum.CameraType.Scriptable
CurrentCamera.CameraSubject = Item.Camera
CurrentCamera.CFrame = Item.Camera.CFrame
script.Parent.Item.Text = Item.Configure.Item.Value
if plr.Items:FindFirstChild(Item.Configure.Item.Value) then
script.Parent.Button.TextLabel.Text = "Equip"
else
script.Parent.Button.TextLabel.Text = Item.Configure.Price.Value
end
end)
Close.MouseButton1Click:Connect(function()
script.Parent.Parent.ClickEffect:Play()
CurrentCamera.CameraType = Enum.CameraType.Custom
CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
CurrentCamera.CFrame = game.Players.LocalPlayer.Character.Head.CFrame
script.Parent.Parent.Main.Visible = true
script.Parent.Parent.TwitterCode.Visible = true
script.Parent.Visible = false
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
wait(2)
db = false
end)
Equip.MouseButton1Click:Connect(function()
if script.Parent.Button.TextLabel.Text == "Equip" then
script.Parent.Parent.ClickEffect:Play()
game.ReplicatedStorage.RemoteEvents.EquipItem:FireServer(game.Workspace.Items[CurrentItem])
CurrentCamera.CameraType = Enum.CameraType.Custom
CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
CurrentCamera.CFrame = game.Players.LocalPlayer.Character.Head.CFrame
script.Parent.Parent.Main.Visible = true
script.Parent.Parent.TwitterCode.Visible = true
script.Parent.Visible = false
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
wait(2)
db = false
else
script.Parent.Parent.ClickEffect:Play()
game.ReplicatedStorage.RemoteEvents.Buy:FireServer(game.Workspace.Items[CurrentItem])
end
end)
game.ReplicatedStorage.RemoteEvents.Buy.OnClientEvent:Connect(function(ItemBought)
local Item = game.Workspace.Items[CurrentItem]
if Item.Configure.Item.Value == ItemBought then
script.Parent.Button.TextLabel.Text = "Equip"
end
end)

3 comments
Sidenote: Don't try and reinvent the wheel, if you want a "multi-page" window you can use UIPageLayout. The whole part of Next and Previous, having to render the right page and everything will be unnecessary. Additionally make sure your debounce (db) is properly set everywhere. Normally a debounce is used to keep 1 event from being spammed too often, with buttons this is often not a huge deal.
Additionally you can use the debugger to see if the line where you set the price to the textlabel is actually reached, if not you can work your way back from there
how tf do I use the debugger