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

How to rebind the reset button?

I was trying to rebind the reset button but it still kills my character, am I doing this right?

local pos = CFrame.new(4.179, 6.653, 73.886)
local player = game.Players.LocalPlayer

game:GetService("StarterGui"):SetCore("ResetButtonCallback", player.Character:SetPrimaryPartCFrame(pos))

1 answer

✓ Accepted answer

###No. The second argument to SetCore is either a boolean or a BindableEvent.

local pos = CFrame.new(4.179, 6.653, 73.886)
local player = game.Players.LocalPlayer
local resetBindable = Instance.new("BindableEvent")

resetBindable.Event:Connect(function() -- put code under event
    player.Character:SetPrimaryPartCFrame(pos)
end)

game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)

6 comments

0

i just realized this script doesn't work in game? it's parent is the player backpack

0

You probably need to change the position on the server

0

it says "LoadCharacter can only be called by the backend server"

0

Oh it's because it can't be used in the client

0

how could i identify the player if I used a remote event?

0

wait, ill make a new question

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