#How to Sync player skin on a Dummy

68 messages · Page 1 of 1 (latest)

karmic kite
#

It’s mainly used on menus

cobalt canyon
karmic kite
#

its not working for some reason

cobalt canyon
#

i think

karmic kite
#

to link them

cobalt canyon
#

show it

karmic kite
#

server sided ```local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GetCharacter = Instance.new("RemoteEvent")

GetCharacter.Name = "GetCharacter"
GetCharacter.Parent = ReplicatedStorage

local function GetAppearance(UserID)
return Players:GetHumanoidDescriptionFromUserId(UserID)
end

GetCharacter.OnServerEvent:Connect(function(player)
local Appearance = GetAppearance(player.UserId)
GetCharacter:FireClient(player, Appearance)
end)
client sidedlocal ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local GetCharacter = ReplicatedStorage:WaitForChild("GetCharacter")

local localDummy = workspace:WaitForChild("Dummy")

GetCharacter:FireServer()

GetCharacter.OnClientEvent:Connect(function(Appearance)
if localDummy then
local success, err = pcall(function()
localDummy.Humanoid:ApplyDescription(Appearance)
end)

    if not success then
        warn("Failed to apply appearance:", err)
    end
else
    warn("localDummy not found!")
end

end)

#

this is the last one i tried

#

i tried manys

cobalt canyon
karmic kite
#

yea

cobalt canyon
#

in workspace that wouldn't work since the localscript actions get ignored

#

so clone the rig, parent it to workspace and apply description

karmic kite
#

alr

#

imam try that

#

still not working atall

#

🥶

cobalt canyon
karmic kite
#

local function CreateOfflineCharacter(player)
    if player.Character then
        local characterClone = player.Character:Clone()

        local dummy = game.ReplicatedStorage:FindFirstChild("Dummy")

        if dummy then
            local dummyClone = dummy:Clone()
            dummyClone.Parent = game.Workspace

            if dummyClone.PrimaryPart then
                characterClone:SetPrimaryPartCFrame(dummyClone.PrimaryPart.CFrame)
                characterClone.Parent = game.Workspace

                if dummyClone:FindFirstChild("Character") then
                    dummyClone.Character:Destroy()
                end

                dummyClone.Character = characterClone
            else
                warn("PrimaryPart not found in cloned Dummy")
            end
        else
            warn("Dummy not found in ReplicatedStorage")
        end
    else
        warn("Player character not found")
    end
end

local getCharacterEvent = Instance.new("RemoteEvent")
getCharacterEvent.Name = "GetCharacter"
getCharacterEvent.Parent = game.ReplicatedStorage

getCharacterEvent.OnServerEvent:Connect(function(player)
    CreateOfflineCharacter(player)
end)
cobalt canyon
#

you don't even need setprimarypartcframe when theres humanoidrootpart

karmic kite
#

and the other is for positioning

cobalt canyon
#

not server

karmic kite
#

o

#

lemme fix that

karmic kite
#
local Players = game:GetService("Players")

local GetCharacter = ReplicatedStorage:WaitForChild("GetCharacter")

local dummyTemplate = ReplicatedStorage:WaitForChild("Dummy")

local clonedDummy = dummyTemplate:Clone()
clonedDummy.Parent = workspace
clonedDummy.Name = "Dummy"

local localDummy = workspace:WaitForChild("Dummy")


local function applyAppearance(Appearance)
    if localDummy then
        local success, err = pcall(function()
            local humanoid = localDummy:WaitForChild("Humanoid")
            humanoid:ApplyDescription(Appearance)
        end)

        if not success then
            warn("Failed to apply appearance:", err)
        end
    else
        warn("localDummy not found!")
    end
end


GetCharacter.OnClientEvent:Connect(function(Appearance)
    applyAppearance(Appearance)
end)
#

here

#

clone work but appearance still not

#

i dont understand why its not working

#

no output error

cobalt canyon
karmic kite
#

for the function

#

im not just gonna clone

#

or im missing smth?

#

basically

#

i clone the dummy that is in the replicatestorage like you said

#

and then i local the dummy that i cloned

#

to apply my function for the appearance

#

or maybe i didnt understand u

cobalt canyon
#

why do you also need a pcall function

karmic kite
#

it runs the function you pass to it and catches any errors that occur

#

simply

#

wait srry brb quick imma go afk 10 min im gonna try smth

#

it may work

cobalt canyon
# karmic kite it may work

local dummy = game.ReplicatedStorage.Dummy
local cloned = dummy:Clone()
cloned.Parent = game.Workspace
local e = game.Players.LocalPlayer:GetHumanoidDescriptionFromUserId(game.Players.LocalPlayer.UserId)
cloned.Humanoid:ApplyDescription(e)```
#

there now try

karmic kite
#

GetHumanoidDescriptionFromUserId is not a valid member of Player "Players.(myusername)" - Client - LocalScript:4

cobalt canyon
cobalt canyon
#

np

karmic kite
#

and if i want to add an animation to the dummy

#

its script server sided or client?

#

yea i got my answer

#

its in client side

#

server side cant work

cobalt canyon