I dont really get remove() but i see it on tycoons so i tried to make a buy button myself.
keeps saying WoodMine (the name of the item) is not a valid member of DataModel
any help?
script.Parent.Touched:connect(function(hit)
local item = script.Parent.Parent.Item.Value
if hit.Parent.Humanoid ~= nil then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player.leaderstats.Money.Value > script.Parent.Parent.Price.Value or player.leaderstats.Money.Value == script.Parent.Parent.Price.Value then
game[item].Parent = script.Parent.Parent.Parent
end
end
end)

1 comment
WoodMine is not a valid member of workspace...