Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Rock dropper script for a minigame isn't working. Where is my error?

Asked by 3 years ago

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:

local rock = game.ReplicatedStorage.RockFaller

rock.Touched:Connect(function(hit)

    if hit.Parent:FindFirstChild("Humanoid") then

        hit.Parent.Humanoid.Health = 0

    end

    local temple = game.Workspace.DesertTemple

    temple.Touched:Connect(function(hit)

        if hit.Parent:FindFirstChild("Humanoid") then

            wait(1)

            local rock = game.ReplicatedStorage.RockFaller

            local rockclone = rock:Clone()

            rockclone.Parent = workspace

            wait(2)

            rockclone:Destroy()



        end
    end
0
wait: so does the rock spawn? idk if it seems like it in this script so speedyfox66 237 — 3y
0
no the rock does not spawn FilipinoWrld 22 — 3y

Answer this question