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

Problem With Line 15?

Asked by 9 years ago

Omg I asked so many question today but I'm having trouble with Line 15 with this script:

spawn = game.Workspace.HouseArea
player = script.Parent.Parent.Parent.Parent

local funtcion onClicked()
    local spawnArea = game.Workspace.HouseArea;
    local playerList = game.Players:GetChildren()
    local playerToTeleport = nil;

    for key, value in pairs(playerList) do
        playerToTeleport = game.Workspace:FindFirstChild(value.Name);
        if playerToTeleport ~= nill then
            player.Torso.CFrame = CFrame.new(spawnArea.Position);
        end
    end
end

   script.Parent.MouseButton1Down:connect(onClicked)

It keeps saying '<eof>' expected near 'end' GRRR I could never learn scripting :(

1 answer

Log in to vote
-1
Answered by 9 years ago

Try removing local at line 4

Ad

Answer this question