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

How do you make a refresh GUI button without your character teleporting back to spawn?

Asked by 6 years ago
Edited 6 years ago
plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
    pcall(function()
        local Pos = plr.Character:GetPrimaryPartCFrame()
        plr:LoadCharacter()
        plr.Character:SetPrimaryPartCFrame(Pos)
        if plr.Character:FindFirstChild("ForceField") then
            plr.Character["ForceField"]:Destroy()
        end
    end)
end)

I need help! Whenever this is activated, it teleports me back at spawn. I want to stay in the position I'm in.

0
You're reloading the character though, so it would naturally respawn.. iamnoamesa 674 — 6y
0
You don't need to find a forceshield to destroy it. There is a way players can start without it wilsonsilva007 373 — 6y

Answer this question