Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local LogsValue = game.ReplicatedStorage.LogsFound
- for i, Wood in pairs(script.Parent:GetChildren()) do
- if Wood:IsA("Part") then
- local ClickDetector = Wood:FindFirstChild("ClickDetector")
- ClickDetector.MouseClick:Connect(function()
- Wood:Destroy()
- LogsValue.Value += 1
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement