Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Setting character to a model, it works for a few seconds but suddenly respawns the character?

I have this script that sets the character to a model I made with humanoid etc. etc. all set up. The player is able to control the model for a good few seconds, then out of nowhere the character suddenly respawns. I've checked if the humanrootpart was the source but it wasn't.

This also only happens in game and not studio. I've tried put waits on the humanoid and humanoidrootpart but it doesn't work. Also their no error log for why this happens.

	local player = game.Players.LocalPlayer
	local char = player.Character
	local camera = game.Workspace.CurrentCamera
	CachedCharacter = player.Character
	
	
	local BeastM = game.ReplicatedStorage.Titans["Beast Titan"].Beast:Clone()
	game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
	BeastM:WaitForChild("HumanoidRootPart")
	wait()
	BeastM.Parent = game.Workspace

	player.Character = BeastM
	camera.CameraSubject = BeastM["Head"]
	camera.CameraType = "Follow"

2 comments

0

don't wait for child and set it automatically to humanoid. the wait may delay the transfer and thus causes the player to die

0

Didn't work, still after few seconds the character respawns.

1 answer

Not 100% sure if this will do the same as you want, but you can put the model in StarterPlayer and name it to "StarterCharacter" and it will give everyone who spawns that appearance

1 comment

0

Its not, as the script is post to just give control over the model and then be able to return at a later time. So I don't want it to spawn the character in as this model.

This discussion is preserved as it was. New answers, comments, and votes are closed.