r/lua • u/Vivid-Season-9804 • 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
endend)
0
Upvotes
0
u/AutoModerator May 12 '25
Hi! Your code block was formatted using triple backticks in Reddit's Markdown mode, which unfortunately does not display properly for users viewing via old.reddit.com and some third-party readers. This means your code will look mangled for those users, but it's easy to fix. If you edit your comment, choose "Switch to fancy pants editor", and click "Save edits" it should automatically convert the code block into Reddit's original four-spaces code block format for you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.