Hello guys, I want to clone the player character. So this error appears.
16:41:06.446 - Players.NiniBlackJackQc.PlayerScripts.LocalModule:50: attempt to index a nil value
Why and how to fix this?
--< Services
local PlayerService = game:GetService('Players')
--< Variables
local Player = PlayerService.LocalPlayer
Player.Character:Clone().Parent = PlayerGui.ProfileGui.ProfileFrame.Profile.Character

4 comments
I'm sorry, but I'm gonna have to downvote for suggesting looping until exists. Use events!
How can I use events for this? This is the only method I have ever known.
game.Players.LocalPlayer.CharacterAdded:Wait()
OK. Thanks!