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

01local didyouwin = 0
02    local function CompleteTheObby()
03        TimerEvent:FireAllClients(30)
04-- TimerEvent is one of my remote functions, it sets a timer
05        wait(30)
06        game.Workspace.ObbyCompleted.Touched:Connect(function(WonObby)
07--invisible part gets touched when you win
08        didyouwin =1
09 
10        end)
11        if didyouwin ==1 then
12        else
13            for i,v in pairs(game.Players:GetPlayers()) do
14            if v.Character then
15                v.Character.Humanoid.Health = 0
16                    end
17                end
18            end
19        end
20end

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