Well, my mistake is that when playing a part with something, it should give money and perform other functions, but it gives an error when wanting to give money.
local Give = script.Parent.Give
local Give2 = script.Parent.Give2
local Give3 = script.Parent.Give3
Give.Touched:Connect(function(hit, player)
local char = hit.Parent
if hit.Name == 'Tronco' then
script.Parent.Anim.Value = 'false'
script.Parent.Taken.Value = 'false'
player:WaitForChild("FolderValues").Dinero.Value = player.FolderValues.Dinero.Value + 5
game.Players:FindFirstChild(player.Name).PlayerGui.MenuDeMapa.Aviso:TweenPosition(UDim2.new(1.12, 0, 0.5, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.6, true)
wait(0.37)
game.Players:FindFirstChild(player.Name).PlayerGui.MenuDeMapa.Aviso.Visible = false
game.Players:FindFirstChild(player.Name).PlayerGui.MenuDeMapa.Aviso.Tronco.Visible = false
local ArmasTools = game.Players:FindFirstChild(player.Name).ArmasTools:GetChildren()
local Backpack = game.Players:FindFirstChild(player.Name).Backpack
for i, ArmasTool in pairs(ArmasTools) do
ArmasTool.Parent = Backpack
end
hit:Destroy()
end
end)