How to make a play button GUI, with a special camera to view a certain area

the thing that says " 14:52:18.224 - Script ‘Players.Disparrel.PlayerGui.ScreenGui.ImageButton.TextButton.LocalScript’, Line 3" is an erorr

You got 4 errors. I think the last one is the problem, “Script ‘Players.Disparrel.PlayerGui.ScreenGui.ImageButton.TextButton.LocalScript’, Line 3”

Can you show me that script?

well anything in blue 30 characters

local CameraPart = workspace.CameraPart
local Camera = workspace.CurrentCamera

repeat Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable

Camera.CFrame = CameraPart.CFrame

script.Parent.MouseButton1Click:Connect(function()
Camera.CameraType = Enum.CameraType.Custom
end)

Is the script, I don’t know if that’s the one it’s talking about, as I have 2 local scripts in the textbutton.

Also if it helps,
When you press “play” on the screen GUI, you get teleported to another game.

no rong one line 3 isnt anything

Can you show me the other script?

its the other script (30 chars)

script.Parent.MouseButton1Click:connect(function()

game:GetService("TeleportService"):Teleport(4569003170)

end)

But that script work perfectly fine, shown above.

its not the localplayer (30 charas

im confused (30 characters!!!)

Uh, what? I’m not much of a scripter, so I don’t understand really. Are you saying It’s not the localscripts?

no im saying he is not specifically saying to teleport the ’ local player 'aka the player that is pressing it!

This is getting off-topic.

Is there a way, to accomplish what I need done? If so, please tell me or try and help me. :slight_smile:

Is there a way to accomplish what I need done? If so tell me, please.

Try to put all of the code above the function in a separate script in StarterGui.

Like this?

local CameraPart = workspace.CameraPart
local Camera = workspace.CurrentCamera

repeat Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable

Camera.CFrame = CameraPart.CFrame

Camera.CameraType = Enum.CameraType.Custom

script.Parent.MouseButton1Click:Connect(function()

end)

local CameraPart = workspace.CameraPart
local Camera = workspace.CurrentCamera

repeat Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable

Camera.CFrame = CameraPart.CFrame

Put this in a separate local script in StarterGui.

Still Isn’t working, I don’t know what’s going on.

Do you have a part in workspace named CameraPart?

Yes, I do. I have enabled the API to the game, check it out if needed: