The Parent property of StalkerMoving is locked, current parent: NULL, new parent Workspace

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to clone my enemy npc from serverstorage to workspace with
local Stalker = game.ServerStorage:WaitForChild("StalkerMoving"):Clone()
Stalker.Parent = game.Workspace
  1. What is the issue? Include screenshots / videos if possible!
    I have a script where it fires an event (replicatedstorage) when I look at the monster
RunService.RenderStepped:Connect(function()
	local Vector, IsVisible = Workspace.CurrentCamera:WorldToScreenPoint(Part.Position)
	local currentTime = tick()

	if IsVisible and Vector.Z <= MaxDistance and (currentTime - lastPrintTime >= printCooldown) then
		lastPrintTime = currentTime
		print("you saw it")
		Event:FireServer()
	end

in the script that checks if the event is fired

Event.OnServerEvent:Connect(function()
	local players = Players:GetPlayers()
	for _, player in ipairs(players) do
	
	if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
			
			game.Workspace.StalkerMoving:Destroy()
			
			Stalker.Parent = game.Workspace
			
			
		end
	end

The model gets destroyed and gets cloned once again, but when it happens for the 3rd time, it says
" The Parent property of StalkerMoving is locked, current parent: NULL, new parent Workspace"

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I tried using using Remove() but it removes the error comment from the output but still doesn’t clone the model. I am new to this devforum. Pls help

Have you tried moving this line into the remote event? Or recloning the model in the remote event?

Nope, I haven’t tried that but the reason why that line exists is because I just want to spawn the model in the workspace when I’ve finished some sort of objective, I didn’t add it because it was unnecessary. But what do you mean by recloning the model in the remote event? :thinking: :thinking: