Selling script not working!

Can you copy and paste the script here so I could fix it for you?

money.Value = money.Value += selling.Value * 1 should be

money.Value += selling.Value * 1

Besides that I don’t think there’s anything else wrong, although not sure why you’re checking if hit exists

2 Likes

I’m unsure how to do the code block because I don’t have the correct things on my keyboard to do it apologies for that.

local Sell = script.Parent
Sell.Touched:Connect(function(hit)
if hit then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
local leaderstats = player:WaitForChild(“leaderstats”)
local money = leaderstats.Coins
local selling = leaderstats.Clicks
if selling.Value > 0 then
money.Value += selling.Value * 1
selling.Value = 0
end
end
end
end)

Use @Ggblocks20’s script (sorry gotta make 31 charahrhacters):

I have tried this but it’s not working and output doesn’t say anything.

Screenshot your explorer.

aaaaaaaaaaaaaaaaaaa