I am making a GUI that changes the players' character based on which skin they've chosen. I'm still testing the system, but it seems to not work. When I call player.LoadCharacter() the character reloads to the old one. I've messed around with it and, sure enough, the StarterCharacter is changed. Can someone tell me what I'm doing wrong? I changed the character from a LocalScript. Here's my code:
---Local script------
wait(10)
game:GetService("StarterPlayer").StarterCharacter:Destroy()
game:GetService("ReplicatedStorage").StarterCharacter:Clone().Parent=game:GetService("StarterPlayer")
wait(20)
game:GetService("ReplicatedStorage").RemoteEvent:FireServer(game:GetService("Players").LocalPlayer.Name)
-----Server script----
game:GetService("ReplicatedStorage").RemoteEvent.OnServerEvent:Connect(function(p)
local char = game:GetService("Players"):FindFirstChild(p.Name):LoadCharacter()
end)

1 comment
Same thing happens with loading character after using Player.CharacterAppearanceId