Code:
-- Variables -- local name1 = script.Parent.Name1 local price = script.Parent.Price script.Parent.Name = "Buy " ..name1.Value.. " - " ..price.Value.. " Cash needed." script.Parent.Head.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if not player then return end if player then if player.leaderstats.Cash.Value >= price.Value then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - price.Value repeat wait() script.Parent.Head.Transparency = script.Parent.Head.Transparency + 0.01 until script.Parent.Head.Transparency == 1 wait() script.Parent.Head:Destroy() script.Parent.Humanoid:Destroy() script.Parent.Name = "(BOUGHT) Buy " ..name1.Value.. " - " ..price.Value.. " Cash needed." for v,i in pairs(workspace["Tycoon"]:GetChildren()) do if i:IsA("Model") and i.Name == "Item" ..name1.Value then for v,part in pairs(i:GetChildren()) do part.CanCollide = true part.Transparency = 0 end end end end end end)
All I get is a blank thing in console that says (xinterger) (such as 1, or 2.)