Universal Script 📌
24.1k Views
2.5k Executions

Save Spot Script

Universal Script 📌
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

This script allows you to save a position and lets you teleport back to that saved position. The button is draggable.

Updates

  1. Script edited: Create script

View Raw
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = playerGui

local button = Instance.new("TextButton")
button.Size = UDim2.new(0, 200, 0, 50)
button.Position = UDim2.new(0.5, -100, 0.5, -25)
button.Text = "Save Spot"
button.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
button.TextColor3 = Color3.fromRGB(255, 255, 255)
button.Parent = screenGui

local savedPosition = nil

local function savePosition()
    local character = player.Character or player.CharacterAdded:Wait()
    local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

    savedPosition = humanoidRootPart.Position

    button.Text = "Teleport to saved spot"
end

local function teleportToSavedSpot()
    if savedPosition then
        local character = player.Character or player.CharacterAdded:Wait()
        local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

        humanoidRootPart.CFrame = CFrame.new(savedPosition)

        button.Text = "Save Spot"
        savedPosition = nil
    end
end

button.MouseButton1Click:Connect(function()
    if savedPosition then
        teleportToSavedSpot()
    else


Comments

1
Log in to join the conversation. Login
Smorgasbord's profile picture
Smorgasbord2 years ago(edited)

w script very useful

1

Tags

More universal scripts

See all
Script hub
176.7k
1.6M
Bumped 1 hour ago
Key System
Script hub
46.5k
11.5k
Bumped 4 hours ago
Key System
Paid
Script hub
2.5M
798.8k
Bumped 5 hours ago
Key System

Script hub

#9 today

Verified script badgeLumin Hub | #1 | Insta Steal