How to make a coin collect system!

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 มิ.ย. 2024
  • In today's video I'm going to show you how to make a coin collecting system.
    leaderstats script:
    game.Players.PlayerAdded:Connect(function(plr)
    local leaderstats = Instance.new("Folder", plr)
    leaderstats.Name = "leaderstats"
    local Money = Instance.new("IntValue", leaderstats)
    Money.Name = "Money" -- set the name to anything you want!
    Money.Value = 0 -- set this to any value you want for player to begin with!
    end)
    Coin Collect script:
    debounce = false
    script.Parent.Touched:Connect(function()
    if debounce == false then
    debounce = true
    local plr = hit.Parent
    local player = plr:GetPlayerFromCharacter(plr)
    player.leaderstats.Money.Value += 100 -- set this to any value you want!
    script.Parent.Transparency = 1
    wait(5)
    script.Parent.Transparency = 0
    debounce = false
    end
    end)
    Hope you enjoyed the video! Subscribe and Like for more tutorials.

ความคิดเห็น • 1

  • @happirat
    @happirat 21 วันที่ผ่านมา

    this is stupidly underrated