#can someone help me???
1 messages · Page 1 of 1 (latest)
what is v
in pairs
if Buttons then
for i, v in pairs(Buttons:GetChildren()) do
spawn(function()
if v:FindFirstChild("Head") then
local newObject = purchasedItems:FindFirstChild(v.Object.Value)
if newObject ~= nil then
objects[newObject.Name] = newObject:Clone()
newObject:Destroy()
else
v:Destroy()
end
if v:FindFirstChild("Dependency") then
v.Head.Transparency = 1
v.Head.CanCollide = false
coroutine.resume(coroutine.create(function()
if purchasedItems:WaitForChild(v.Dependency.Value) then
v.Head.Transparency = 0
v.Head.CanCollide = true
end
end))
end
v.Head.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
if Values.OwnerValue.Value == player then
if v.Head.CanCollide == true then
if player:FindFirstChild("leaderstats").Cash.Value >= v.Price.Value then
player.leaderstats.Cash.Value -= v.Price.Value
objects[v.Object.Value].Parent = purchasedItems
v:Destroy()
end
end
end
end
end)
end
end)
end
end
@maiden rose