Now its just stopping, every shot is discontinuing the script. I already have a check that makes sure the target is glass. I think it might be a glitch, it’s just not getting the mouse.Target through the event? Is there a problem with the event/script?
it might be bc ur using a local when firing the server and not when ur printing it, there is a problem with motor6d if u make a local motor6d.C0 it wont work maybe this is a similar problem
Interesting, I’m going to hold my mouse there, and then look at output. If it doesnt work I’m going to remove the if and see if the “if” statement is messing it up.
I’m not sure if this could be the reason, but one risk of passing object references through remote events is that both the client and the server must have access to the object. In this case, if you were to click an item that only exists locally, the server would print ‘nil’.
Well if the item you clicked exists on the server, then what I described is not the issue here.
However, note that you set an officebuilding as mouse.TargetFilter so that building would be ignored when clicking on it, and a target behind it would be chosen.
But you say you can’t find the name printed locally in explorer… I’m not sure what you mean there. In studio, when it happens, type the printed name in explorer, and do the same after pressing the ‘server’ button. If it exists on the client but not on the server, then that would be the problem.
So as it turns out Headbase is a part made by the gun that is blocking the glass target. It is made locally so the server can get it - explains nil. I however didnt know that target filter made it so that object was ignored - thanks for that. I thought it meant the object would be the only object mouse target could be in. So I need to switch the target filter to the Basehead parent, and then it should work.