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

How i can make my custom char respawn and fix camera?

Asked by 2 years ago
Edited 2 years ago

Im trying to make a Custom Char that u dont see your roblox char, only the custom when reset, but when i reset it keep just "broken" and dont reset and the camera bug stuck in the air. what am i doing wrong? how can i do for it work fine?

    local hollow = RS:FindFirstChild("Hollow")
    local dontrepeat
    local model = RS:FindFirstChild("Hollow")
    if not player.Character.HumanoidRootPart:FindFirstChild(model) then 
    local oldModel = player.Character
    local oldCFrame = oldModel:GetPrimaryPartCFrame()

    local newModel = model:Clone()
    newModel.Parent = workspace
    player.Character = newModel
    dontrepeat = Instance.new("Attachment")
    dontrepeat.Parent = newModel.HumanoidRootPart
    dontrepeat.Name = model
    newModel:SetPrimaryPartCFrame(oldCFrame)
    oldModel:Destroy()
    wait()

Answer this question