-
What do you want to achieve?
I want to stop my character select GUI from resetting when my players switch to a morph. It’s not super time sensitive but I’d like to fix this ASAP. -
What is the issue?
Here’s my script, it fires a remoteEvent in replicatedStorage called ChangeChar.
local event = game.ReplicatedStorage.ChangeChar
event.OnServerEvent:Connect(function(player,model)
local Char = model:Clone()
local Pos = player.Character:GetPrimaryPartCFrame()
player.Character:Destroy()
player.Character = Char
Char.Parent = workspace
Char:SetPrimaryPartCFrame(Pos)
end)
- What solutions have you tried so far?
I tried removing the player.Character:Destroy()
line. For whatever reason, the script still works? Except for the fact that it keeps resetting the GUI.
I’ve also tried messing around with the properties, I even disabled that one hidden (i think?) property called ResetPlayerGuiOnSpawn. I put the script for that in ServerScriptService and then in the button itself, with no luck.
It might be possible to get the children of the current model and make them invisible / disable collisions for the original player. This would make it so I don’t have to kill the original morph.
Here it is in action.
When I click on a character, my morph works, but the GUI goes back to how it was before. This wasn’t a problem until I wanted to add alternate skins for the characters. When I click on the morph name, it shows the “alternate skins” button for a moment before resetting itself.
Any help would be appreciated, thanks!