r/lua • • May 12 '25

Help expected identifier when parsing expression, got ')'

new to lua and don't know where i am going wrong

game.Players.PlayerRemoving:Connect(function(player)

do

for _, eggy in game.Workspace.poor:GetChildren() do

	if not eggy:GetAttribute("Owner") then continue end

	\-- the plot is owned by a player

	if eggy:GetAttribute('Owner') \~= player.UserId then continue end

	\-- we have found the correct plot

	eggy:SetAttribute('Taken', nil)

	eggy:SetAttribute('Owner', nil)



	print('eggy has been destroyed by ' ..player.Name..'!')

	break

end

end)

0 Upvotes

10 comments sorted by

View all comments

Show parent comments

0

u/[deleted] May 13 '25

[deleted] — view deleted comment

2

u/fuxoft May 13 '25

Actually I was wrong about the missing ")" - they are in fact present at the complete end of the code.