Hello !
I know there are bunch of other posts about that, but none could help me.
I have this server script:
local touched = false
local monster = game:GetService("ServerStorage"):WaitForChild("monster1"):Clone()
wait(2)
monster.Parent = workspace
monster:MoveTo(Vector3.new(script.Parent.Position.X + math.random(40, 50), 5, -10))
local target = Instance.new("Part", workspace)
target.Anchored = true
target.Position = monster.PrimaryPart.Position + Vector3.new(0, 0, 20)
local ts = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1.5, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
script.Parent.Touched:Connect(function(touch)
if touch and touch.Parent:FindFirstChild("Humanoid") and touched == false then
touched = true
print("monstr")
local tween = ts:Create(monster.PrimaryPart,tweenInfo,{Position = target.Position})
tween:Play()
tween.Completed:Wait()
print("done")
monster:Destroy()
target:Destroy()
script.Parent:Destroy()
end
end)
And it’s used to make a monster appear and move in front of a player when they touch an invisible part. The monster is stored in ServerStorage, cloned and moved to workspace, but it seems that only the humanoid of the monster is cloned.
I’ve checked, and everything is archivable.
Any solution ?