ryanthapro
(NumberOneAirBreather)
#1
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)
2 Likes
Maybe try PivotTo()
instead of setting the clones humanoidrootpart position directly.
Like so:
clone:PivotTo(CFrame.New(char:WaitForChild("HumanoidRootPart").Position))
1 Like
ryanthapro
(NumberOneAirBreather)
#3
I tried this script and got this error
1 Like
You can’t be serious… obviously CFrame.New
is a typo.
1 Like
ryanthapro
(NumberOneAirBreather)
#5
still didnt work
returned this error
1 Like
Don’t remove the CFrame.new
they just meant to not have it say .New
and instead .new
.
1 Like
system
(system)
Closed
#8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.