Okay, I’m out of ways to fix errors now. I would like to create a system that creates a spinning bar when a key is pressed but only when a player is sat in a seat, I have a client side script firing the event and detecting the keypress, I have some errors, I have never seen them before and hovering over them and clicking on them don’t reveal where the problems are located
I personally believe that the problems is in the excavator script but I have re-written the script a couple times and searched over the dev forum and youtube to no avail
I’m not asking anyone to write me a 100 line script or anything to combat it, just some guidance to where I may have gone wrong as the end result Doesn’t Work. and I’m happy to provide more info on what properties look like or answer any questions.
Thanks for your time
The error explains what’s wrong. You’re calling a function called “Connect”, which expects you to pass a function as the first argument. Since you’re not passing anything it’s as if you passed a nil value. Since nil is not a function, an error is raised explaining that OnServerEvent:Connect expected you to pass a function but you didn’t.
Why do you need to pass a function? Because the purpose of the Connect method of events is to call a listener function when the event happens. It needs to know which function to call, and you let it know by passing a reference to the function you want to be called.
Didn’t quite think this post through, I didn’t actually connect the function in the excavator script
thanks for the help, you said that it did actually explain where the problem was so in the future I wont just look at the red text. Thanks again!
If you can’t figure out what the error messages mean, always feel free to post (or use the search feature in case someone asked the same thing). The error messages can be pretty hard to understand