I was making my cafe's point system until I stumbled across an error. (No error outputted) The code block seems fine, however there is still an error. Can anyone help me solve this problem? Code below:
for _,player in pairs(Players:GetChildren()) do
local function lookForTools()-- THE FOLLOWING CODE BLOCK IS THE ERROR
wait()
local target = player.Backpack:GetChildren():IsA("Tool").CreatorString or player.Character:GetChildren():IsA("Tool").CreatorString
if target.Value == string.sub(tostring(player.Name),1,string.len(player.Name)) and target.Parent.Parent == not string.sub(tostring(player.Name),1,string.len(player.Name)) or target.Parent.Parent.Parent == not string.sub(tostring(player.Name),1,string.len(player.Name)) then
print("caught red handed JKFSADAS")
end
end
end

7 comments
I wish it would work since I wouldn't want to bother you, but I'm sorry, it still doesn't work, yet again; No outputted error. :c
Hmm that is weird, can you add a wait so that when you are fully loaded then the script will run
Still won't work. If you would like to you can add me, user: ISkyLordDoge.
Where is this script located?
Server Script Service.
Can you insert some print statements in LookForTools to see where it fails a conditional or hangs
Could you ellaborate, please? ^~^