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

Can someone tell me what this error means?? [I NEED HELP!!]

So, I made this script that's supposed to block the player's screen and kick them.

game.Players.PlayerAdded:connect(function(player)
	if player.Name == "Player1" then
		screenGui = Instance.new("ScreenGui", player.PlayerGui)
		textbox = Instance.new("TextBox", screenGui)
		textbox.BackgroundColor3 = Color3.new(255,0,0)
		textbox.Size = UDim2.new(1,0,1,0)
		textbox.Text = "No one wants you here."
		wait(.1)
		player:Remove()
	end
end)

But it keeps coming up with this error: 19:32:46.149 - CoreGui.RobloxGui.CoreScripts/Settings:410: attempt to index a nil value Could someone tell me what it means?

1 answer

Well a nil values means the value doesn't exist. For example, if I made a script like so:

gui.Visible = false

I would get a nil value because gui is variable that has not been defined before the script calls for it. I recommend checking over everything to make sure it's not a "nil value". Also if you could tells us which line the output console says this is happening on that would make our life's easier.

1 comment

0

Bman, this has not helped at all. I've checked everything over before, there is not a nil value. And I DON'T know what line it's on. It doesn't say! THIS is what I needed help with. I know what it means when it says a value is nil, but nothing of the part before it. I was needing help figuring out of what the error meant, you didn't help at all.

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