#character model swap not working

67 messages · Page 1 of 1 (latest)

quaint dove
#

local modelToSwapIn = game:GetService("InsertService"):LoadAsset(123456):GetChildren()[1] -- Replace 123456 with the Asset ID of the model you want to swap in

function onTouched(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if humanoid then
local player = game.Players:GetPlayerFromCharacter(humanoid.Parent)
if player then
local character = player.Character
if character then
-- Remove the old character model
character:Destroy()

            -- Clone the new model and attach it to the player's character
            local newCharacter = modelToSwapIn:Clone()
            newCharacter.Parent = workspace
            player.Character = newCharacter
        end
    end
end

end

script.Parent.Touched:Connect(onTouched)

#

thats the code

#

and basically athis is the result

#

I am supposed to be that clown

#

but i dissapeared out of existence

quaint dove
#

please help

rare saffron
#

💀

quaint dove
#

sorry I was sleeping

#

i did change it

#

in the actual code

#

i jsut send the paste of it

#

local modelToSwapIn = game:GetService("InsertService"):LoadAsset(9496886885):GetChildren()[1] -- Replace 123456 with the Asset ID of the model you want to swap in

function onTouched(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if humanoid then
local player = game.Players:GetPlayerFromCharacter(humanoid.Parent)
if player then
local character = player.Character
if character then
-- Remove the old character model
character:Destroy()

            -- Clone the new model and attach it to the player's character
            local newCharacter = modelToSwapIn:Clone()
            newCharacter.Parent = workspace
            player.Character = newCharacter
        end
    end
end

end

script.Parent.Touched:Connect(onTouched)

lean havenBOT
#

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

quaint dove
#

there it is

#

help

lean havenBOT
#

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

quaint dove
#

mb was doing animations

#

@vast star

#

its on a part on the workspace

#

where do I put it?

#

together with the part?

#

I am new with all this

#

imma try that

#

doesnt work

#

maybe I did it wrong

#

Changed the name of the aprt to that

#

no errors too

lean havenBOT
#

studio** You are now Level 3! **studio

quaint dove
#

k

#

So uhh

#

shoudl i change the name of part

#

on the script

#

to "minaPayaso" which is the name of the part?

#

not but like

#

all the parts

#

where it says part

#

cuz in the beggining it says ontouched(part)

#

nvm that

#

i just noticed something

#

I appear far away

#

from my location

#

as what I should be

#

no haha

#

well

#

I am not sure

#

I cant see

#

k

#

where do I check that

lean havenBOT
#

studio** You are now Level 3! **studio

quaint dove
#

yeah but like where do I see the coordinates

#

confirmed

#

i cant move

#

there

#

how

#

?

#

ok

#

imma try that

#

is that everything that I have to try?

#

i thought it would be more haha

#

it works

#

tysm dude