(EDIT: From what I can see, a error pops up in Line 1 located in the Output.)
19:48:50.040 - Infinite yield possible on 'Players.dynamitebirthday:WaitForChild("Character")'
19:48:50.042 - Stack Begin
19:48:50.043 - Script 'Workspace.DominusAureus.Script', Line 2
19:48:50.045 - Stack End
I am currently making this game and as a gamepass test, I made a gamepass which, once purchased, gives the user that purchased it a Dominus Aureus. Problem is, I know many users would want this hat taken off at any point. So, I came up with an idea to make a block, (which includes a ClickDetector and a Script). This script's function would be to remove the dominus, ("GoldenDominus") from the player's accessories in-game. Problem is, once the block has been clicked, nothing happens. I came to the Scripting Helpers Discord for help, and simply got ignored. I came to my friends for help, and they tried all they could do. I had no idea what else to do, except ask here. Any advice on how to fix this? (FYI: The block that I click is named "DominusAureus".)
game.Workspace.DominusAureus.ClickDetector.MouseClick:Connect(function(plr)
local char = plr:WaitForChild("Character")
local dom = char:FindFirstChild("GoldenDominus")
if dom ~= nil then
dom:Destroy()
end
end)

7 comments
i'm not really sure, try just doing if dom then; if dom ~= is alwyas right but just try it
What is the error in the output?
also, try putting some prints inside the event and inside the if statment, just to check if stuff is working
Try replacing "local char = plr:WaitForChild("Character")" with "local char = plr.Character or plr.CharacterAdded:Wait()"
Try deleting the handles parent
I have no idea how to reply to comments, but here I go. (@2052Game, that doesn't appear to work.)
The accessory is exactly named “GoldenDominus”, right? If not, change line 3 to whatever the accessory is called.