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:
local lanyard = game:GetService("ServerStorage"):WaitForChild("Lanyard") GroupId = 4525647 min = 3 game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) if player:GetRankInGroup(GroupID) >= min then local clonedlanyard = lanyard:Clone() clonedlanyard.Parent = game.Workspace:WaitForChild(player.Name) end end)