I am trying to make a game where monsters spawn at night, but when I clone the model to a folder in workspace, It keeps getting deleted! When clones to just workspace, not the folder, however, It runs fine!
It runs fine on the roblox client, but in studio, they keep getting deleted. I tried changing it to ReplicatedStorage, but that still got them deleted when inside the folder, so I changed it back. I also tried chaning the postition set to SetPrimaryPartCFrame, but it still gets deleted.
This is the function that spawns them
local Monster = game.ServerStorage.Monster
local ClonedMonster = Monster:Clone()
print("Cloned")
ClonedMonster.Parent = game.Workspace.Monsters
local XPos = math.random(-1000, 1000)
local ZPos = math.random(-1000, 1000)
ClonedMonster:SetPrimaryPartCFrame(CFrame.new(XPos,4,ZPos))
wait()
Please help me if you can