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

How would i make an obby with a timer?

Asked by 4 years ago

i am trying to make a part of my game with parkour but whenever i try to call the function it says the function does not exist, here is my code

local didyouwin = 0
    local function CompleteTheObby()
        TimerEvent:FireAllClients(30)
-- TimerEvent is one of my remote functions, it sets a timer
        wait(30)
        game.Workspace.ObbyCompleted.Touched:Connect(function(WonObby)
--invisible part gets touched when you win
        didyouwin =1

        end)
        if didyouwin ==1 then
        else
            for i,v in pairs(game.Players:GetPlayers()) do
            if v.Character then
                v.Character.Humanoid.Health = 0
                    end
                end
            end
        end
end

Again, when i try to call the function it says it dosent exist. please help.

0
Try changing the 'local function' to just 'function' MiguRB 60 — 4y

Answer this question