How do you not respawn if it is even possible?
So sorry for my last post. I was sick then.
How do you not respawn if it is even possible?
So sorry for my last post. I was sick then.
It seems your problem is that you have "respawn" functionality that you do not want to fire when you change the Character property. If it is connected to the CharacterAdded event, the answer to "why is it firing when I change the Character" is simply that you added a character, and so the event will fire.
Since the event fires with the character model as an argument, an easy workaround might be to add some sort of 'tag' to your custom character model(s). ex, add a "CustomCharacter" Folder (or any instance you like). Then, for the respawn event/function, do:
player.CharacterAdded:connect(function(model)
if model:FindFirstChild("CustomCharacter") then return end --custom character
--rest of your respawn functionality here
end)
Don't forget to add the "CustomCharacter" tag to the model before changing the character, ex
Instance.new("Folder", newCharacter).Name = "CustomCharacter"
player.Character = newCharacter
(Obviously all variable names may have to be changed to fit with your script.)
With all this, you will have made sure that your respawn code doesn't execute if the character is one that you set up.
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
I don't think Roblox intended for you to do set the character property, I might be wrong.
^ Respawning sets the character property back to the character roblox provides for you.
Awwww. Is there any way to bypass it?
You actually don't respawn when you set the character property. The CharacterAdded event does fire though, which could cause problems. You need to supply more information and the code you're using for further help.