I'm am trying to make a hat unlock for my clicker game. If you have 500 cash then it unlocks a hat. The enable is the enable button to equip the hat.
local Player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
if Player.Cookies.Value >= "500" then
script.Parent.ImageColor3 = Color3.new(255,255,255)
script.Parent.ImageTransparency = 0
script.Parent.Parent.Enable.Visible = true
else
script.Parent.ImageColor3 = Color3.new(0,0,0)
script.Parent.ImageTransparency = 0.7
script.Parent.Parent.Enable.Visible = false
end

2 comments
plishalp
The script will run once if you don't add an event or a loop, try to make it into a while loop or a .Changed event.