-
What do you want to achieve? Keep it simple and clear!
I want to make a Seek rig that clones from ReplicatedStorage into the workspace and chases you. -
What is the issue? Include screenshots / videos if possible!
The issue is that the rig, after a few seconds deletes all the body parts inside of it after using the :Clone() function. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have checked all over the Developer Hub but could not find anything.
This is the code: (also sorry if it is formatted wrongly this is my first post)
ReplicatedStorage.Events.TriggerChase:FireAllClients(entranceCF)
enemyModel.PrimaryPart.Anchored = true
enemyModel:PivotTo(entranceCF * offset)
enemyModel.Parent = workspace
enemyModel.PrimaryPart.Scream:Play()
local tween = TweenService:Create(enemyModel.PrimaryPart, TweenInfo.new(2), {CFrame = entranceCF})
tween:Play()
enemyModel.PrimaryPart.Anchored = false
tween.Completed:Wait()
print(enemyModel.Parent)
print(enemyModel.PrimaryPart)
enemyModel.PrimaryPart.SeekRunning:Play()
enemyModel.Humanoid.WalkSpeed = 26
for i, v in enemyModel:GetDescendants() do
if v:IsA("BasePart") then
v.CollisionGroup = "Monster"
end
end
print(enemyModel.PrimaryPart)
local connection
connection = RunService.Heartbeat:Connect(function()
print(enemyModel.PrimaryPart)
if not enemyModel.PrimaryPart then
warn("NO PRIMARY PART")
connection:Disconnect()
return
end
if not currentRoomNumber then
warn("NO CURRENTROOMNUMBER")
return
end
The output:
I’ve tried setting the rig’s parts Archivable to true but that did not help. (They were always Archivable set to true)