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

Expected identifier when parsing expression, got ')'??

Asked by 4 years ago

This is my first time trying any code whatsoever so I'm really new to this. Where did I go wrong?

local TeleportService = game:GetService ("TeleportService")
local part = script.Parent
local debounce

debounce = false

    part.Touched:Connect (function(hit)

        if debounce == false then
        debounce = true

    local human = hit.Parent:FindFirstChild("Humanoid")


        if human then
            local char = hit.Parent


        local player = game.Players:GetPlayerFromCharacter(char)
            TeleportService:Teleport(gameID, player)

    wait(5)
    debounce = false

        end
end)

I'm really lost here.

1 answer

Log in to vote
0
Answered by
ede2355 22
4 years ago

So, you're literally missing an end at the bottom.

So it would be like this:


local TeleportService = game:GetService ("TeleportService") local part = script.Parent local debounce debounce = false part.Touched:Connect (function(hit) if debounce == false then debounce = true local human = hit.Parent:FindFirstChild("Humanoid") if human then local char = hit.Parent local player = game.Players:GetPlayerFromCharacter(char) TeleportService:Teleport(gameID, player) wait(5) debounce = false end end end)

Don't need to copy and paste of course, just write down the extra end :/

0
Oh, thanks! Jaykeor 0 — 4y
0
No problem! ede2355 22 — 4y
0
Now please mark this as solved. And you're good to go. ede2355 22 — 4y
Ad

Answer this question