Advertisement
bacnguyenxgen

Tính điểm cho người chơi khi chạm khối

Mar 30th, 2021
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. local rac = script.Parent
  2. local diem = 50
  3. local Nguoichoi = game:GetService("Players")
  4. -- Tính điểm cho người chơi
  5. local function congdiem(tennguoichoi)
  6.     local playerStats = tennguoichoi:WaitForChild("leaderstats")
  7.     local diemnguoichoi= playerStats:WaitForChild("Points")
  8.     -- Viết câu lệnh xác định số điểm khi người chơi chạm vào khối:
  9.    
  10.     rac:Destroy()
  11. end
  12. -- Kiểm tra việc chạm vào đối tượng của người chơi:
  13. local function chamkhoi(bophan)
  14.    
  15. end
  16. rac.Touched:Connect(chamkhoi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement