Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Selling place doesnt work somoen explain why?

help the value will not add to the other value although it recognises it

local Part = script.Parent Part.Touched:Connect(function(HIT) 
local H = HIT.Parent:FindFirstChild("Humanoid") 
if H then 
local player = game.Players:GetPlayerFromCharacter(HIT.Parent)
if player then 
local leaderstats = player:WaitForChild("leaderstats")

local stats = player:WaitForChild("stats") 
local Currency = leaderstats.money 
local Selling = stats.cheese print(Currency)
 
if Selling.Value > 0 then 
Currency.Value = Currency.Value + Selling.Value *1
Selling.Value = 0 
end
 end
 end 
end)

2 comments

0

Can you make this more readable

0

Ok

1 answer

solved just had to put in player with local script

This discussion is preserved as it was. New answers, comments, and votes are closed.