Ad
Log in to vote
0

how can i make more triggers?

Asked by 15 days ago

i was making a trigger that spawns the slenderman so i made that when you touch it, it deletes the trigger and then, it waits for some seconds and then the script spawns another trigger from the replicated storage, but the script dosent work whit the new trigger, it only works whit the first one and then it dosent work, pls help``

function spawner()
    local trigger = game:GetService("ReplicatedStorage").Trigger:clone()
    trigger.Parent = workspace
end

while true do
    wait(0.0001)
    script.Parent.Parent.Workspace.Trigger.Touched:Connect(function()
        wait(0.0001)
        game.Workspace.Trigger:Destroy()
        wait(5)
        spawner()
    end)
end

Answer this question