Checking how many times player did join the game, Changing the camera

Hi!
I want to make a system that when I click the play button checks whether a player is playing for the first time or not:

If it is true then teleport the player to the tutorial place
If it’s false then let the player join the default map


And I have another problem too :T
when I press the edit character button, the camera moves correctly but when i want to press play it doesn’t move the camera it just teleports the player to the map
is there any solution?
or can you tell me how I can add some GUI like arrow to change between the cameras
These are the main menu codes

main-menu
workspace

local script:

local cc = workspace.CurrentCamera

local MC = workspace.MainCamera
local CEC = workspace.CECamera

local PB = script.Parent.PlayButton
local CEB = script.Parent.CEButton

wait(.001)

cc.CameraType = Enum.CameraType.Scriptable

cc.CFrame = MC.CFrame

local function PlayEntered()
	cc.CFrame = MC.CFrame
end

PB.MouseButton1Click:Connect(PlayEntered)

local function CEEntered()
	cc.CFrame = CEC.CFrame	
end

CEB.MouseButton1Click:Connect(CEEntered)

teleport script:

local ts = game:GetService("TeleportService")

local pb = script.Parent.PlayButton

local placeID = 14051154842

pb.MouseButton1Click:Connect(function(player)
	wait(.01)
	ts:Teleport(placeID, player)
end)
1 Like

You change your camera to scriptable but never change it back:

cc.CameraType = Enum.CameraType.Scriptable

See camera options:

1 Like

There is post already about checking if a player is new:

1 Like

Ty i did that but i have a question
should i remove the teleport script inside the gui?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.