How to check if a part has a exact children

Or you can just set the primaryPart and use model.PrimaryPart.Position – i use this lol

oh ok i just didnt understand this quoted part, and how i get the children of the model (that is a npc) then

Alr Ill explain

character69420

To pass on information from the client to server, the arguments in the FireServer use something known as Tuples. (Arguments are basically what you add in the Parenthesis, like FIreServer(Arguments in here))

The first argument of the FireServer is Always the player, and you dont need to add it in. But you do need to specify it in the ServerScript. For Example,

Local Script: 

local number = 420.69

Event:FireServer(number) -- You pass on the number

ServerScript:

Event.OnServerEvent:Connect(function(number) -- paraneters of the server script
      -- if you try to print the number, it will come out as nil, because
     -- AS I said, the first argument in the fire server is always the player, 
      --so you dont need to specify it, but you do need to add it on the server script
end)

Correct server Script will be:

Event.OnServerEvent:Connect(function(player, number) -- now the script knows that the number is the second param, you can pass multiple arguments from the client, but just remember to add player as the first parameter in the server script : D

You dont need to learn what tuples are yet, (they are 2d arrays I think)|
Hope this Helped : D

Ohhhhh now i understand it, but one last question: how do i get then the target part of the mouse

You can make a variable for it on the client, and then pass it on to the server.

local _MouseTarget = Mouse.Target

Event:FireServer(_MouseTarget)

Server:

event.OnServerEvent:Connect(function(player, currMouseTarget) -- name it whatever
      while wait(0.6) do
            print(currMouseTarget)
      end
end)

Hope that my explanation gives you a good example of how roblox's client-server model works (basically remote eventss and functions)

Dont Focus on tuples for now, learn them when you start getting better at scripting. Here is an article that helps: What are tuples? - #9 by TheEdgyDev

Oh i understand it, butttt its still not geting the mousetarget : / srry if its annoying

Thats weird. Ill try on my own, one second

TOtally works for me.

I dont know why your script isnt workin, sorry :frowning:

No problem! it is not annoying, People on the devforum dont get annoyed because of helping a beginner understand a doubt :smiley:

wait, but my script its in a tool, and works when its activated is that a problem?

:man_facepalming: equip the tool and then the mouse target will be printed

oh ok :smiley:

message has no 30 letters

its equiped

message has no 30000 letters

Is the targetPart being printed?

nope, wait ima try adapting your script to mine and see if it works

can i see a pic of the explorer?

sure

message has no 10043 letters

heres the pic

Screenshot_200

Looks fine, I dont know what the error is at this point, have you welded all of the parts of the gun btw
?