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

How do I get the play button to tp a player to a designated spawn?

Asked by 2 years ago

I would like for my play button to tp my player to a designated spawn, the spawn is located in game.Workspace.Spawn

Here is the current play button code

local player = game.Players.LocalPlayer
local character = player.CharacterAdded
local Mouse = player:GetMouse()
local camera = game.Workspace.CurrentCamera

local defaultCframe = camera.CFrame
local view = 500
local blur = game.Lighting.Blur

blur.Size = 3

function updateCamera()
  camera.CFrame = game.Workspace.MenuCamera.CFrame
end

game:GetService("RunService").RenderStepped:Connect(updateCamera)

script.Parent.Frame.Play.MouseButton1Click:Connect(function()
    wait(0.2)
    blur.Size = 0
    game.Workspace.MenuMusic:Stop()
    camera.CameraType = Enum.CameraType.Custom
    script.Parent.Parent.Main.MainFrame.Visible = true
    script.Parent.Frame:Destroy()
    script:Destroy()
end)
0
Can you clarify your question, are you trying to move the spawn's position? RichDiggerW189 2 — 2y
0
if so, you can do this on your own RichDiggerW189 2 — 2y

Answer this question