Why is my script for a lanyard clone giving me expected to close error? [solved]
I created this script like a month ago, I decided to use it in my game but it's not working. The output gives me this error:
"19:58:10.832 - Workspace.Staff Lanyard:12: 'end' expected (to close 'function' at line 5) near '<eof>'"
How do I fix this?
Here is my script:
01 | local lanyard = game:GetService( "ServerStorage" ):WaitForChild( "Lanyard" ) |
05 | game.Players.PlayerAdded:Connect( function (player) |
06 | player.CharacterAdded:Connect( function (character) |
07 | if player:GetRankInGroup(GroupID) > = min then |
08 | local clonedlanyard = lanyard:Clone() |
09 | clonedlanyard.Parent = game.Workspace:WaitForChild(player.Name) |