Im trying to make a sell system for a simulator game and I was wondering how I would make the clicks value change into the cash value.
Heres my code:
script.Parent.Touched:Connect(function(hit)
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if player then
local leaderstats = player:WaitForChild("leaderstats")
local clicksvalue = leaderstats.Clicks.Value
local cashvalue = leaderstats.Cash.Value
end
end)