hello i am making a stand in my game and its based on omori for those who know something about the game its that when omori takes a fatal hit he always survives on 1 hp with the text “Omori did not succumb” appearing i want to make the same thing apply for the stand and its user by making it so when the user takes a fatal hit he dies but the stand does not succumb and then you switch and start controlling the stand without its user being present
also it doesnt matter if the user humanoid gets deletted when switching to the stand since he is supposed to die anyway thats the whole idea
the problem is i have no idea on where to begain or what to use in order to do it i’ve read a couple posts but they are usally reporting a problem so the codes and answers i find there are like super specifc if someone can provide me with a doccument or a really simple version of the code that i can modify and upgrade to learn on i’d be really thankful .
If you want to have a custom character as a starting one.
Put your Rig model inside StarterPlayer and rename the model to “StarterPlayerCharacter”
If you want to change character during runtime, you can do that by changing player property.
Player.Character = yourRig
Don’t forget to update cameraSubject on currentCamera
i dont want to copy the cloth due to the rig having alot of specific stuff and code so cloning everything will be really messy cant we just make the rig be able to move
when using “player.character = rig” everything works fine exept that i cant control or move the rig
Instead of changing characters you can spawn a clone dummy of yourself and change your actual character appearance to look exactly like the swap character.
I would like to know if there’s a better way to do this as well
second i need to be able to control the rig itself like how jujutsu shenanigens does with the ten shadows and mahoraga mahoraga isnt simply a reskin of the player he is a whole model
Name it startercharacter and make sure you’re parenting it into the startercharacter otherwise it wont work.
As you already said make sure everything is unanchored and the models primary part is the humanoid root part.
Another thing could be the name of the parts inside your model (Example: UpperRightLeg, and the joints should be like Right Shoulder, make sure theres a space)
so i managed to do it and here is the script and stuff i found out
in the local script
UserInputService.InputBegan:Connect(function(input, Typing)
if Typing == true then return end
if input.KeyCode == Enum.KeyCode.E then
workspace.Camera.CameraSubject = workspace.CustomRig.Humanoid -- switching camera target
storage.RemoteEvent:FireServer()
end
end)
in the server script
storage.RemoteEvent.OnServerEvent:Connect(function(plr)
-- cloning the scripts from the old character befor it gets deletted
local anim = plr.Character.Animate:Clone()
local hp = plr.Character.Health:Clone()
-- switching the character which will delete the old one
plr.Character = workspace.CustomRig
plr.Character.HumanoidRootPart.Anchored = false
-- parenting the copied scripts to the new rig
hp.Parent = plr.Character
anim.Parent = plr.Character
end)
what i found out
1: the rig doesnt need to be named StarterCharacter
2: you need to switch the player’s character in the server side otherwise it might cause some weird bugs
3: when switching from the server side the old character gets deletted so make sure to copy both the health and animate script befor switching and after the switch paste them into the new character