Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is the character respawning?

Asked by 9 years ago

Basically, I made my own model to replace the character model that you spawn with. It works fine at first, however after a few seconds of living as the new model, the player suddenly respawns and reverts to his default looks (Much like the reset character button). Why is this happening, and how can I fix it?

I created a Text Button (GUI) that once contains the following script:

local plr = game.Players.LocalPlayer
local cam = workspace.CurrentCamera

script.Parent.MouseButton1Click:connect(function()
    local model = game.ReplicatedStorage.PlayerModel:Clone() -- Create the custom model to replace the character
    model.Name = plr.Name -- Rename it to the player's name
    model.Parent = workspace -- Place it in the workspace
    plr.Character = model -- Replace the players default character with the new custom model

    game.ReplicatedStorage.LocalScripts.Animate:Clone().Parent = plr.Character  -- Insert the script that will animate the character
    cam.CameraSubject = plr.Character.Humanoid -- Make the camera follow the new character
end)

I should note that this happens only when testing in a server. This does not happen in solo mode.

0
Did you make a weld between the head and torso for your model? RedCombee 585 — 9y
0
I am FAIRLY certain that the character is alive. Heck, im walking around with it. NutsNWaffles 135 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

ROBLOX. Studio has replay,play,and a stop button did you press any of them by mistake? Did you test this in a script builder perhaps?

Ad

Answer this question