Im making a system that lets you spawn custom npcs, but whenever I spawn one, the physics are extremely buggy
LocalScript
script.Parent.MouseButton1Up:Connect(function()
local uid = script.Parent.Parent.TextBox.Text
game.ReplicatedStorage.RemoteEvent:FireServer(uid)
end)
ServerScript
local dummy = game.ServerStorage.Dummy
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(Player, uid)
local char = Player.Character
local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(uid)
local clone = dummy:Clone()
clone.Parent = workspace
clone.Humanoid:ApplyDescription(newHumanoidDescription)
clone.HumanoidRootPart.Position = char:WaitForChild("HumanoidRootPart").Position
end)