Hello Developers!
I am having this issue were when I rebirth in the game (it resets all the data) the collector
doesnt seem to be working anymore
sample script:
game.Players.PlayerAdded:Connect(function(player)
for i,v in pairs(script.Parent.Essentials:GetChildren()) do
if v.Name == "PartCollector" then
v.Touched:connect(function(Part)
if Part:FindFirstChild('Cash') then
Money.Value = Money.Value + Part.Cash.Value
Debris:AddItem(Part,0.1)
local Stats = game.ServerStorage.PlayerMoney:FindFirstChild(player)
if Stats ~= nil then
NoDelaySound(script.Parent.Essentials.PartCollector, Settings.Sounds.Collect)
Stats.Value = Stats.Value + Money.Value
Money.Value = 0
end
end
end)
end
end
end)
If anyone could help me on this that would be great!