local sellPart = script.Parent sellPart.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 playerGold = leaderstats.Gold local playerMIS = leaderstats.MoneyInStorage print(playerMIS.Value) playerMIS.Value = playerMIS.Value *1 if playerMIS.Value > 0 then playerGold.Value = playerGold.Value + playerMIS.Value playerMIS.Value = 0 end end end end)
It always thinks that playerMIS.Value = 0 but it is actually another number like 10 (>0) in my leaderstat. Any way I can fix that?? Naturally playerMIS.Value increases through LocalScript while this is usual Script, maybe it is a problem?