I can't fix weird error in output. This has never happened to me before, can someone help?
Asked by
4 years ago Edited 4 years ago
So I made a sitpart that when touched the player gets sit even if they don't want to be sitted.
Here is the script:
1 | script.Parent.Touched:Connect( function (hit) |
2 | local Humanoid = hit.Parent:FindFirstChild( "Humanoid" ) |
It works fine for me but when I look at the output this error appears:
|23:32:20.221 Workspace.SitPart.Script3: attempt to index nil with 'Sit' - Server - Script:3
I have tried fixing it but I can't fix it.
I have also tried adding a debounce to the script which wasn't successful because that same problem up there appeared in the output so I think that blocked the debounce from working.