NPC not attacking

Hello developers,

So I made a few NPCs that attack eachother with weapons. When I run the game while they are in the Workspace they attack properly, but when I put them in ReplicatedStorage then clone them to the Workspace they don’t even move.

Here is my script for the GUI that clones the NPCs

script.Parent.MouseButton1Click:Connect(function()
	twixter = game.ReplicatedStorage.Twixter:Clone()
	twixter.Parent = game.Workspace

	nulgor = game.ReplicatedStorage.Nulgor:Clone()
	nulgor.Parent = game.Workspace
end)

Thanks

this doesn’t seem to happen when I clone my bot into my game. Although I believe it might be better to disable the scripts inside the original model, and then enable the clone’s scripts when they get parented to the workspace.

2 Likes

I am recieving this error.
image

Are you using local script to clone the npcs?

1 Like

Yes I am. 30charssss 30 charsssss

Oh yeah, you can’t use a local script to clone things, you need to do it server-sided, in this case you need to use a remote event

1 Like

That is the issue, use server script or use events to broadcast messages between the scripts

I will try it out with a Script. Thanks for the advice @FastAsFlash_Dev

1 Like