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

an error says that "end is too close at line 5" did you forget to close then at line 9?




--The Error says "Expected end. (too close then at line 5) Did you forget to close then at line 9"?

local Humanoid = script.Parent.Humanoid script.Parent.Humanoid.Died:Connect(function(died) local tag = Humanoid:FindFirstChild("creator") if tag ~= nil then if tag.value ~= nil then local leaderstats = tag.Value:FindFirstChild ("leaderstats")

		if leaderstats ~= nil then
		
             	leaderstats.Currency.Value = leaderstats.Currency.Value +30
		
			script:remove()
			

		

		   end
	
		script.Parent.Humanoid.Died:Connect(died)

1 comment

0

Try doing what the error says, it might start magically working

1 answer

✓ Accepted answer

Your first if statement is missing an end, try adding one at line 14. These errors aren't useless by the way, listening to them might get you somewhere. Also, please format your code correctly.

Hope this helped.

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