I hope someone can help me. I’ve been going through all the tutorials on the Learn Roblox Studio site (Learn Roblox). I’m currently going through the tutorial “Hit Detection with Lasers”. I finished inputting the code shown on the page “Firing Towards the Target”. After entering all the code on that page, I then tested. When I fire the laser, I get the below error.
15:00:00.187 Players.Player1.Backpack.Blaster.ToolController:44: attempt to index nil with ‘Character’ - Server - ToolController:44
15:00:00.188 Stack Begin - Studio
15:00:00.189 Script ‘Players.Player1.Backpack.Blaster.ToolController’, Line 44 - function fireWeapon - Studio - ToolController:44
15:00:00.190 Script ‘Players.Player1.Backpack.Blaster.ToolController’, Line 79 - function toolActivated - Studio - ToolController:79
15:00:00.191 Stack End - Studio
This error is generated by the below line of code.
Here’s a screen shot from Roblox Studio. I even tried copying and pasting the code from the tutorial, but I still get the error. Clearly, I’m doing something wrong. Anyone else have this problem with the tutorial? Any help would be appreciated
Just wanted to let you know local scripts can be edited by exploiters with ease and FE exists so the damaging and raycasting wont show up to other players, only the player who fired it.
It is not actually I did a horrible job with explanation in that post, by FE I mean filtering enabled. Filtering enabled is there to prevent changes in the client to replicate to other clients or the server but with some exceptions like animations. Another reason it exists is to help fight exploiters from just changing something in their client (lets say delete the base plate) to replicate or happen to other players screens. Take a look at this article, Client-Server Model | Roblox Creator Documentation. For now don’t worry about this until you want to start making games for other players.