I was wonder how to make this script work because when i hover over the button everything else works but the image label... heres the code that i use if you see any errors in it please tell me and help me correct it. i know theres errors.
local player = game.Players.LocalPlayer
local GravityCoil = "1592513575"
local currency = player:WaitForChild('leaderstats').Coins
local amount = 100
local tool = game.ServerStorage:WaitForChild('GravityCoil')
local indextext = script.Parent.Text
script.Parent.MouseButton1Click:connect(function()
if currency.Value >=100 and not player.Backpack:FindFirstChild('GravityCoil')or player.Character:FindFirstChild('GravityCoil')then
currency.Value = currency.Value - amount
local newtool = tool:Clone()
newtool.Parent = player.Backpack
else
script.Parent.Text = "Purchase Failed, Try again later"
wait(0.5)
script.Parent.Text = indextext
end
end)
script.Parent.MouseEnter:connect(function()
script.Parent.Parent.Parent.productimage.Image = 'rbxassetid://'..GravityCoil
script.Parent.Parent.Parent.Description.Text = script.descvalue.Value
script.Parent.Parent.Parent.ProductTitle.Text = script.TitleValue.Value
end)
script.Parent.MouseEnter:connect(function()
script.Parent.Parent.Parent.productimage.Image = GravityCoil
script.Parent.Parent.Parent.Description.Text = ""
script.Parent.Parent.Parent.ProductTitle.Text =""
end)
