Advertisement
Sungmingamerpro13

ProximityPrompt Collect(STORY GAME)

Nov 21st, 2022
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. local LogsValue = game.ReplicatedStorage.LogsFound
  2.  
  3. for i, Wood in pairs(script.Parent:GetChildren()) do
  4. if Wood:IsA("Part") then
  5. local ProximityPrompt = Wood:FindFirstChild("ProximityPrompt")
  6.  
  7. ProximityPrompt.Triggered:Connect(function()
  8. Wood:Destroy()
  9. LogsValue.Value += 1
  10. end)
  11. end
  12. end
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement