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

It only says Expected '}' (to close '{' at line 2), got 'game' help?

Asked by 3 years ago

I dont know why it only says Expected '}' (to close '{' at line 2), got 'game' when i try the game... heres the script:

local Tween = game:GetService("TweenService"):Create(game.Workspace.Baseplate,TweenInfo.new(100,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0),{Size = Vector3.new(0,2000,0):Play() game.Players.PlayerAdded:Connect(function(player) Player.CharacterAdded:Connect(function(char) char.Humanoid.Dead:Connect(function() player:Kick("YOURE OUT MAN") end) end) end)

1 answer

Log in to vote
0
Answered by
TGazza 1336 Moderation Voter
3 years ago

you're missing a } and a ) at the end of your code

local Tween = game:GetService("TweenService"):Create(
    game.Workspace.Baseplate,
    TweenInfo.new(
        100,
        Enum.EasingStyle.Linear,
        Enum.EasingDirection.In,
        0,
        false,
        0
    ),
    {
        Size = Vector3.new(0,2000,0):Play() 
        game.Players.PlayerAdded:Connect(function(player) 
            Player.CharacterAdded:Connect(function(char) 
                char.Humanoid.Dead:Connect(function() 
                    player:Kick("YOURE OUT MAN") 
                end) 
            end) 
        end)
-- \/\/\/\/\/ These bits are missing! \/\/\/\/\/

    }
)

Also format your code so its a little easier to read kinda like how i have so you can spot things like this

0
How do i do that? I am not really sure shadow93126 10 — 3y
0
Highlight your code block and press tab LeedleLeeRocket 1257 — 3y
Ad

Answer this question