so i made a clone script when on the server side and i need for clones to spawn right in the players body, also i have a directional movement script that also doesn`t work on the clones
local rs = game.ReplicatedStorage
local event = rs.SandevistanFolder:WaitForChild("SandevistanRemote")
local ClonesFolder = game.Workspace:WaitForChild("ClonesFolder")
event.OnServerEvent:Connect(function(player)
table.insert(PlayersOnCD, player.Name)
local timepassed = tick()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChild("Humanoid")
local function CloneDestroy(clone)
task.wait(0.7)
clone:Destroy()
end
local function CloneCharacter()
if character then
character.Archivable = true
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
local clone = character:Clone()
for _, cloneChild in pairs(clone:GetChildren()) do
if cloneChild:IsA("BasePart") then
cloneChild.Anchored = true
cloneChild.CanCollide = false
cloneChild.CollisionGroup = "Clone"
end
end
clone.HumanoidRootPart.CFrame = humanoidRootPart.CFrame
clone.Parent = ClonesFolder
clone.Name = "Clone"
clone.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
clone.Humanoid.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
CloneDestroy(clone)
end
end
end
while tick() - timepassed < 5 and humanoid.Health > 0 do
task.spawn(CloneCharacter)
task.wait(.1)
end
end)
** You are now Level 1! **