Rock dropper script for a minigame isn't working. Where is my error?
So I was making a rock dropping script for when a player goes up the mountain, a rock will fall and maybe kill that player. When I was testing it, there was no error on my output but it didn't work. Is there any error on my script that I should fix? (Script Below)
Script:
01 | local rock = game.ReplicatedStorage.RockFaller |
03 | rock.Touched:Connect( function (hit) |
05 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
07 | hit.Parent.Humanoid.Health = 0 |
11 | local temple = game.Workspace.DesertTemple |
13 | temple.Touched:Connect( function (hit) |
15 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
19 | local rock = game.ReplicatedStorage.RockFaller |
21 | local rockclone = rock:Clone() |
23 | rockclone.Parent = workspace |