I was trying to create fake character for one of my scripts, because server scripts are slow and I do not have support for requires (to communicate smoothly or create client replication due to the sandbox). The localscript (NLS) creates the animations. The script (NS, or main script not in NLS) is going to communicate with the client to add the special effects to it like parts. Currently everything works, except for the jumping. I can't jump in any way, and I can't solve it. I have been trying for a while, but nothing works. Help would be appreciated. Here is the script:
game:GetService("RunService").Stepped:Connect(function()
for i,v in pairs(owner.Character:GetDescendants()) do
pcall(function() v:SetNetworkOwner(owner) end)
end
end)
NLS([[
game:GetService('RunService').Stepped:connect(function()
game.Players.LocalPlayer.Character.Head.CanCollide = false
game.Players.LocalPlayer.Character.Torso.CanCollide = false
game.Players.LocalPlayer.Character["Left Leg"].CanCollide = false
game.Players.LocalPlayer.Character["Right Leg"].CanCollide = false
end)
function Align(Part0,Part1,PosOff,RotOff)
local AlignPos = Instance.new('AlignPosition', Part0)
AlignPos.ApplyAtCenterOfMass = true
AlignPos.MaxForce = 5772000
AlignPos.MaxVelocity = math.huge/9e110
AlignPos.ReactionForceEnabled = false
AlignPos.Responsiveness = 200
AlignPos.RigidityEnabled = false
local AlignOri = Instance.new('AlignOrientation', Part0)
AlignOri.MaxAngularVelocity = math.huge/9e110
AlignOri.MaxTorque = 5772000
AlignOri.PrimaryAxisOnly = false
AlignOri.ReactionTorqueEnabled = false
AlignOri.Responsiveness = 200
AlignOri.RigidityEnabled = false
local AttA = Instance.new("Attachment",Part0)
AttA.Name = "Att"
local AttB = Instance.new("Attachment",Part1)
AttB.Name = "Att"
AttA.Position = PosOff
AttB.Orientation = RotOff
AlignPos.Attachment0 = AttA
AlignOri.Attachment0 = AttA
AlignPos.Attachment1 = AttB
AlignOri.Attachment1 = AttB
end
local plr = owner
local chr = plr.Character
chr.Archivable = true
local fakechr = chr:Clone()
chr.Archivable = false
fakechr.Parent = workspace
for i,v in pairs(fakechr:GetDescendants()) do
pcall(function() v.Transparency = 1 end)
end
chr.Animate:Destroy()
chr.Humanoid.Animator:Destroy()
fakechr.Animate:Destroy()
fakechr.Humanoid.Animator:Destroy()
chr["Left Arm"]:BreakJoints()
Align(chr["Left Arm"],fakechr["Left Arm"],Vector3.new(0,0,0),Vector3.new(0,0,0))
chr["Right Arm"]:BreakJoints()
Align(chr["Right Arm"],fakechr["Right Arm"],Vector3.new(0,0,0),Vector3.new(0,0,0))
chr["Left Leg"]:BreakJoints()
Align(chr["Left Leg"],fakechr["Left Leg"],Vector3.new(0,0,0),Vector3.new(0,0,0))
chr["Right Leg"]:BreakJoints()
Align(chr["Right Leg"],fakechr["Right Leg"],Vector3.new(0,0,0),Vector3.new(0,0,0))
Align(chr["Torso"],fakechr["Torso"],Vector3.new(0,0,0),Vector3.new(0,0,0))
game:GetService("RunService").RenderStepped:Connect(function()
chr:SetPrimaryPartCFrame(fakechr["Torso"].CFrame * CFrame.new(0,1.5,0))
chr["Left Arm"].CFrame = fakechr["Left Arm"].CFrame
chr["Right Arm"].CFrame = fakechr["Right Arm"].CFrame
chr["Left Leg"].CFrame = fakechr["Left Leg"].CFrame
chr["Right Leg"].CFrame = fakechr["Right Leg"].CFrame
end)
workspace.CurrentCamera.CameraSubject = fakechr
plr.Character = fakechr
]],owner.PlayerGui)
Or if you are completely disgusted by non hosted scripts, here is the script on Github Gist.

2 comments
sussus amogus?
jellyfish jam