Hello, I would like some guidance on where to begin with making something similar to this:
I attempted it, kind of, by parenting the NPC to the player’s character but glitches occurred–my head transferring to the NPC or getting stuck within its body (no where near the effect of the video).
I believe it requires actual code to accomplish and not as simple as parenting it the char, any help would be appreciated
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local Weld = Instance.new("Weld")
local Dummy = ServerStorage.Dummy
local function CloneCharacter(plr)
local Char = plr.Character or plr.CharacterAdded:Wait()
Char.Archivable = true
Weld.Parent = Char.HumanoidRootPart
Weld.Part0=Char.HumanoidRootPart
Weld.Part1=Dummy.PrimaryPart
Dummy:SetPrimaryPartCFrame(Char.HumanoidRootPart.CFrame * CFrame.new(0,0,-5))
Dummy.Parent = workspace
local CloneAnimation = ReplicatedStorage.Animate:Clone()
CloneAnimation.Parent = Dummy
end
game.Players.PlayerAdded:Connect(function(plr)
CloneCharacter(plr)
end)
The npc model remains inside the character for whatever reason when welding and setting cframe. I can atleast move my character unlike other attempts
EDIT: NPC is moved but my player character is signicantly hindered as if the npc is weighing it down (i also put massless true, though not sure if it helps)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local Weld = Instance.new("Weld")
local Dummy = ServerStorage.Dummy
local function CloneCharacter(plr)
local Char = plr.Character or plr.CharacterAdded:Wait()
Char.Archivable = true
Weld.Parent = Char.HumanoidRootPart
Weld.Part0=Char.HumanoidRootPart
Weld.Part1=Dummy.PrimaryPart
Weld.C1=CFrame.new(3,0,-2)
Dummy.Parent = workspace
local CloneAnimation = ReplicatedStorage.Animate:Clone()
CloneAnimation.Parent = Dummy
end
game.Players.PlayerAdded:Connect(function(plr)
CloneCharacter(plr)
end)