You’ll probably have to implement custom respawning logic.
local StarterGui = game:GetService("StarterGui")
local function resetButtonCallback()
-- Handle resetting here (loading character, clean up, etc.)
end
-- In case ResetButtonCallback hasn't been registered yet.
while not pcall(
StarterGui.SetCore, StarterGui,
"ResetButtonCallback", resetButtonCallback
) do task.wait() end
Instead of setting the bunny as a starter character, you can set the player’s character directly to the bunny and load them. Skeleton of what im thinking:
local bunny = …
character = bunny
bunny.Parent = workspace
loadcharacter
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local ResetBindable = Instance.new("BindableEvent")
ResetBindable.Event:Connect(function()
local Character = Players.LocalPlayer.Character
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Character and Humanoid then
Humanoid.Health = 0
end
end)
while task.wait() do
local success, _ = pcall(function()
return StarterGui:SetCore("ResetButtonCallback", ResetBindable)
end)
end