This is the ImageButtonScript
local GunPrice = script.Parent.GunPrice
local GunName = script.Parent.GunName
local pp = script.Parent.Parent.Parent.PromptPurchase
local ItemName = pp.ItemName
local ItemPrice = pp.ItemPrice
local Open = pp.Open
script.Parent.MouseButton1Click:Connect(function()
if Open.Value == 0 then
pp.Visible = true
Open.Value = 1
ItemPrice.Value = GunPrice.Value
ItemName = GunName
print("Worked")
end
end)
This is the script for changing the text label(Name)
local ItemName = script.Parent.Parent.ItemName
script.Parent.Text = ItemName
This is the script for changing the text label(Price)
wait(1)
local Price = script.Parent.Parent.ItemPrice
script.Parent.Text = "$"..Price.Value

1 comment
can you give more details? are you getting an error or is it just not doing anything? is the imagebuttonscript a localscript? is it printing 'Worked'? do you know where exactly its not working