Well, first off you’re using WaitForChild(). So, if the instance doesn’t exist, it will infinitely yield until it is found (which might be never)
So, you should change to :FindFirstChild(). This will check once, and if there is no LureName in the character, then it will return nil.
Alternatively, you could specify a time argument in :WaitForChild(), which is done by adding :WaitForChild(object, time). This will terminate the process after that many seconds, although there’s no reason to use this in most cases and :FindFirstChild is better here.
Also I got this error:
11:55:17.363 Workspace.OminusOfficesMap.Dumpster1.DumpsterOpenMain.Main.WeightedItemDistribution:103: attempt to index nil with ‘Name’ - Server - WeightedItemDistribution:103
local toolEquipped = workspace[plr.Name]:WaitForChild(LureName)
print(toolEquipped.Name)
if toolEquipped then
Maybe this… Think that is like findfirstchild() but even more directly. If that isn’t loaded yet = nil.
local toolEquipped = workspace:WaitForChild(plr.Name):WaitForChild(LureName)
That’s good. it means that may have an error and now we’re on the the next error.
You had: (true or nil):(wait for true) --probably the reason for the nil
Now you have (wait for true):(wait for true)
And now you’re seeing the time limit error from one of them waits.
That means you’re not setting that to where it is exactly…
Wait, this is probably wrong but, isn’t the player character called the player display name? Like if your roblox name is 2973udj and your display name is yyear22 the character is called yyear22.