Need help with NPC script

So basically I’m making a fighting game, everything is going well but theres a thing in the combat system that only works for players. I want it to work for NPC’s as well, the issue is that NPC’s can’t use RemotEvents so the thing glitches a little. I wonder if there’s any solution to this or if I have to make it another way.

2 Likes

Why would you need to use a remote event?
Also it is literally impossible to understand what this “combat system” you are talking about is.

1 Like

My bad, so basically when you hit a player. It fires a remoteevent, but you cant fire remotevents for NPcs so it doesnt work

1 Like

This might sound harsh but it’s gonna help you a lot in the long term:

When you post a topic in the Scripting Support category, please follow the format provided in the About section of the category.

As indicated by the post linked above, you should keep the contents of your post clear and simple, make sure your problem is understandable in any point of view; people are not going to know what exactly is going on in your game.

This category is meant for specific scripting help on a more in-depth look. (i.e. “Attempt to index nil on walkspeed script” instead of “Character won’t walk”)´

You must figure out the issue prior to posting on this category, or if that’s the reason of your post, you must provide all details necessary to aid you in your issue.

In addition, RemoteEvents will work as intended if placed as a descendant/children of an Instance both Client and Server can index, such as ReplicatedStorage, Workspace, etc.
If your NPC is placed inside an instance Client or Server cannot address your RemoteEvent will not work.

For more information please look into the RemoteEvent developer wiki page.

1 Like

Maybe try this tutorial

Basically it uses bindable events.

1 Like

I fixed it myself, anyway thank you for this.