#Locally copied humanoid interfering with LocalPlayer's character

1 messages · Page 1 of 1 (latest)

idle sonnet
#

I am trying to copy a humanoid character for only visuals. After cloning it from replicatedstorage locally, I clone all my LocalPlayer's clothes onto it and update its position in RenderStepped. For some reason this locally cloned humanoid is interfering with my LocalPlayer's character. Updating it's position is also somehow updating my LocalPlayer's character's position even though there shouldn't be any interference.

In a nutshell the goal is to clone a character and insert LocalPlayer's character's clothes onto it and use it purely for visuals on the client side. Thank you in advance!

bright tide
# idle sonnet I am trying to copy a humanoid character for only visuals. After cloning it from...

i think ur trying to do smt like this
https://www.youtube.com/watch?v=Sh3DMk_ya2I

How to Spawn As A CUSTOM Character in Roblox Studio (2020)

Hey guys welcome back to a brand new roblox scripting tutorial and in today's video I am actually not going to be scripting to much but I am going to be teaching you guys how to add in your own custom characters in roblox studio. It's a lot easier than you may think and this short video...

▶ Play video
#

this would be less janky

idle sonnet
bright tide
#

what does the character look like

idle sonnet
#

Its a character with custom animations and welds and my local characters clothes should be copied onto it

drowsy patioBOT
#

studio** You are now Level 1! **studio

idle sonnet
#

Its a character with humanoid basically. It can be anything. Problem is that roblox’s physics engine gets messed up or something when I add the humanoid locally and update its position. The position update is changing my real characters position as well.

#

Even though there isnt any connection between my local character and the copied humanoid Ive made in my scripts.

bright tide
idle sonnet
#

Nope its just local

#

The extra character

bright tide
idle sonnet
#

Yeah others see only the original character

#

I will see the clone in first person. Basically the goal is so when turning camera up or down the clone will rotate.

bright tide
idle sonnet
#

Cos roblox doesnt have up or down rotation by default

idle sonnet
idle sonnet
# bright tide ??

Like when you look up or down no part of your character is rotating

#

If you look side to side your character rotates

#

With the camera

bright tide
#

but up and down

idle sonnet
#

Yeah

#

And I need it to rotate around the camera center point cos its an fps game

bright tide
#

nevermind the hitbox is really werid and you just fly everywhere

idle sonnet
#

I think its the easiest cos if I copy the entire rig and rotate the whole rig then animations will be preserved and I just need to rotate the full rig vs rotating all individual parts

bright tide
drowsy patioBOT
#

studio** You are now Level 10! **studio

idle sonnet
#

Well depends where you rotate it but Im not sure if you can rotate it around any point

#

Ill check

bright tide
idle sonnet
#

I think it might interfere with the animations

drowsy patioBOT
#

studio** You are now Level 2! **studio

idle sonnet
#

There was something that almost worked

#

I attached motor6d joint around the shoulders so it was in the center of the camera

#

But when I turned side to side with that joint my character body didnt move instantly

#

I tried updating the position side to side manually but still the joint ”lagged” behind

bright tide
# idle sonnet I think it might interfere with the animations

idk how to do animation stuff and mix and match upper and lower body thingys

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer


local function disableCollisions(character)
    for _, part in ipairs(character:GetDescendants()) do
        if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
            part.CanCollide = false
        end
    end
end

RunService.RenderStepped:Connect(function()
    local character = player.Character
    if not character or not character:FindFirstChild("HumanoidRootPart") then return end

    disableCollisions(character)

    local hrp = character.HumanoidRootPart
    local camPos = workspace.CurrentCamera.CFrame.Position

    local lookVector = (camPos - hrp.Position).Unit

    local reverseLook = -lookVector

    hrp.CFrame = CFrame.new(hrp.Position, hrp.Position + reverseLook)
end)

but heres what you asked for
i did it on the player instead of cloning a rig
which makes it move werid but if u clone a rig and remove the mass and collision it should be fine

#

i dont think this is the solution you should do
you still have the problem of fixing this on the server showing other players your looking up and down

#

if you can fix it on the server theres no need for this script

idle sonnet
#

Im not showing it to other players

#

Thanks Ill test this but it looks a lot like what I tested

bright tide
idle sonnet
#

@bright tide I think that will need its own mechanic