Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Selling place doesnt work somoen explain why?

Asked by 4 years ago
Edited 4 years ago

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)
0
Can you make this more readable thatwalmartman 404 — 4y
0
Ok nothesducks 15 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

solved just had to put in player with local script

Ad

Answer this question