SO. For some weird reason this script wont work.
I have a bunch of scripts just like this that work perfectly but for some reason this one just wont friggen work
I get an error message stating that it attempted to compare an instance to a value which is not true.
local function attemptToBuy(player)
local money = player.leaderstats.Tokens
if money then
if money.Value >= cost then
money.Value = money.Value - cost
itemClone.Parent = container
button:Destroy()
local show = game.Workspace.Tycoon.AutoDropper9.BuyButton
show.Transparency = 0
show.CanCollide = true
show.CanTouch = true
local show2 = show.Label.TextLabel
show2.Visible = true
local show = game.Workspace.Tycoon.Wall6.BuyButton
show.Transparency = 0
show.CanCollide = true
show.CanTouch = true
local show2 = show.Label.TextLabel
show2.Visible = true
end
end
end
What the heck is wrong?
Btw roblox gotta upgrade their error messages, they are not very helpful when it comes to specifics.