Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

2 comments

0

How do i do that? I am not really sure

0

Highlight your code block and press tab

This discussion is preserved as it was. New answers, comments, and votes are closed.