#Change player appearance to be model

1 messages · Page 1 of 1 (latest)

old vortex
#

I'm trying to make it so that when the player clicks z, it changes its appearance to a custom model and clicking z again reverts the player's appearance back to normal. I keep getting "attempt to index nil with 'Clone'" and idk what's wrong:

local player = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")

local character = player.Character or player.CharacterAdded:Wait()

local originalModel = character:Clone()
local botModel = workspace:WaitForChild("BOT 2"):Clone()

local isBot = false

UIS.InputBegan:Connect(function(input, _)
if input.KeyCode == Enum.KeyCode.Z then
if isBot then
player.Character = originalModel:Clone() <- This is the line where the error is coming from
else
player.Character = botModel:Clone()
end

    character = player.Character
    isBot = not isBot
end

end)

minor basin
#

try parenting originalModel

old vortex
#

what does that mean

#

what's parenting

minor basin
#

cmon bro

eternal quarry
#

💀

clear pelican
# old vortex what's parenting

well i can tell you what parenting isn't, and that would be not letting your children sit on an ipad all day with no human interaction. fingerguns

old vortex
#

Literally yesterday

minor basin
#

go watch a tutorial first

old vortex
#

Can u point me towards a tutorial

minor basin
#

This is the first episode and beginning to become a Roblox Scripter/Game Developer! With 3 playlists (Beginner, Advanced, GUI) containing 50+ videos and 30+ hours of content, I will guide you through this journey to start making the games you want to create on Roblox!

DISCORD 📜
Join my Discord Community if you want scripting help, participat...

▶ Play video
#

PATREON🎁
Get Access to My Scripts + More Perks by Becoming a Patreon Member!
https://www.patreon.com/BrawlDev

DISCORD 📜
Join my Discord Community if you want scripting help, participate in events/challenges, and make friends!
https://discord.gg/WC6kPu5W5P

ADVANCED ROBLOX SCRIPTING SERIES 🔴
https://www.youtube.com/playlist?list=PLQ1Qd...

▶ Play video
#

ts good

clear pelican
#

chatgpt is a hell of a copium for lack of skill

old vortex
#

Thx