Remote Event Not working

My remote event is not working, I am firing from the server to the client. Here is my code:


-- Server Script:
script.Parent.RecruitUI:FireClient(player)
	print("success")
------------------------------------

-- Client script:

script.Parent.RecruitUI.OnClientEvent:Connect(function()
	print("player")
end)

The client seems to not be picking up when the server fires the client.

image

Is recruit a player or an NPC?

the recruit player is an npc ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

This player argument must be a Player instance.

Maybe I haven’t explained it well. I am creating a tower defense game where you click the npc and a certain gui pops up. I get the player instance from the click detecter

Now I understand it. The local script doesn’t work because it isn’t a descendant of the player instance, the local script instead is at the Recruit module itself, and only Players can run local scripts.

2 Likes

Ok thank you if I put the local script out of the recruit model it now works thank you