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

How would I regen a character? Not respawn but regen.

Asked by 4 years ago
local Sand = game.Workspace:WaitForChild("Sand")
local Debounce = false
 Sand.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
    if Debounce == false then Debounce = true
         game.ReplicatedStorage.GravityController:Destroy()
         print("Module successfully destroyed")
        end
    end
end)

if game.ReplicatedStorage.GravityController:Destroy() then
    workspace:FindFirstChild("Humanoid")  -- this is where I want to regen the character
end
0
Do you mean regen as in health thatwalmartman 404 — 4y
0
no as in reloading the character Nistrict 44 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Check this out: https://developer.roblox.com/en-us/api-reference/function/Player/LoadCharacter

It essentially just re-creates the player model.

If this is a direct answer to your question make this an accepted answer.

Ad

Answer this question