In my game, I have a cloning script so when you purchase the model, your money goes down and the model spawns in. What i want it to do is when you spawn in the model, it gives you money overtime automatically in your leaderstat. What would i add to my clone script to make this possible?
Script:
local button = script.Parent
local gui=button.Parent
local player=gui.Parent.Parent.Parent
button.MouseButton1Click:Connect(function()
if player.leaderstats.racks.Value>=200 then
player.leaderstats.racks.Value-=200
ClonedTalent = game.ServerStorage.Talents.Ben:Clone()
ClonedTalent.Parent = game.Workspace ClonedTalent.Name = "Talent"
end
end
