Advertisement
Sungmingamerpro13

LogsCollectedPad (STORY GAME)

Nov 28th, 2023 (edited)
696
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.48 KB | None | 0 0
  1. local LogsGui = script.Parent.LogsGui
  2.  
  3. local LogsFound = game.ReplicatedStorage.LogsFound
  4.  
  5. script.Parent.Touched:Connect(function(Hit)
  6.     if Hit.Parent:FindFirstChild("Humanoid") then
  7.        
  8.         local Character = Hit.Parent
  9.         local player = game.Players:GetPlayerFromCharacter(Character)
  10.        
  11.         local Wood = player.Character:FindFirstChild("Log")
  12.        
  13.         LogsGui.logsLabel.Text = LogsFound.Value.." / 8"
  14.        
  15.         if Wood then
  16.             Wood:Destroy()
  17.             LogsFound.Value += 1
  18.         end
  19.     end
  20. end)
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement