Hello, I am trying to change the player’s character when they press a gui button, but it isn’t working:
The rig appears and the player body dissapears, before shortly appearing again, and the player going back to normal.
This is my code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvents = ReplicatedStorage.Events
local Ships = ReplicatedStorage.Ships
RemoteEvents.ChangeCharacter.OnServerEvent:Connect(function(player, ship)
local NewShip = Ships:FindFirstChild(ship):Clone()
NewShip.Name = "StarterCharacter"
NewShip.Parent = workspace
player.Character = NewShip
player:LoadCharacter()
end)
My model:
Any help is greatly appreciated, thank you!