#Help camera script

1 messages · Page 1 of 1 (latest)

dry dagger
#

Im trying to make a localscript that when the player joins the game his camera goes right into a part cframe called "StarterCameraPart" ( the name of the part that I want the camera Cframe to go )

naive raftBOT
#

studio** You are now Level 6! **studio

brave rain
#

And where is the exact problem?

dry dagger
#

Here

#

Sorry if its bad

#

The photo

#

@verbal bronze

brave rain
dry dagger
#

Ohhhh

#

Cool

#

Im starting to understand

#

Its some stuff like enum?

brave rain
#

yeah

dry dagger
#

K

brave rain
#

Camera.CameraType = Enum.CameraType.Scriptable

If i am not wrong

verbal bronze
#
Camera.CameraType = Enum.CameraType.Scriptable
``` add this
naive raftBOT
#

studio** You are now Level 13! **studio

dry dagger
#

Hmmm

verbal bronze
dry dagger
#

Lemme try

#

LocalPlayer is not a valid member of Player "Players.Leonardo115037"

dry dagger
verbal bronze
#

let me rewrite your code then.

#

wait

dry dagger
#

Ye

#

Also

#

StarterPlayer propertys has the camera forced to

#

To first person

#

Not script, just explorer

#

And i want to when a Play textbutton gets clicked it will go back to the player normal camera

dry dagger
#

Lemme try one thing rq

#

The script is a localscript

#

But localplayer doesent works somehow...

verbal bronze
#
local Players = game:GetService("Players")
local camera = workspace.CurrentCamera
local startCameraPart = workspace:WaitForChild("StarterCameraPart")

local function onCharacterAdded(character)
    camera.CFrame = startCameraPart.CFrame
    camera.CameraType = Enum.CameraType.Scriptable
end

local function onPlayerAdded(player: Player)
    local character = player.Character or player.CharacterAdded:Wait()
    character.CharacterAdded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded)
dry dagger
#

Hmm

verbal bronze
#

@dry dagger are you trying to make a menu camera?

dry dagger
#

K

dry dagger
#

Player joins

verbal bronze
#

ohhhh

dry dagger
#

Player camera = a part cframe

#

In the workspace

#

Obviously

verbal bronze
#

use runservice then

dry dagger
verbal bronze
#

never mind

dry dagger
#

Uhmm...

brave rain
# dry dagger And i want to when a Play textbutton gets clicked it will go back to the player ...

Here are two tutorials that might help you with what your trying to do:

Gui Button tutorial: https://youtu.be/QYskgw5n40s?si=7P2ZL6y2In8oSpCS

Camera Manipulation tutorial: https://youtu.be/FhCNvyuZ-mE?si=ucLhot1nCQXCsg0z

📜Join my Discord Community if you want scripting help, give feedback, or just hang out:
https://discord.gg/WC6kPu5W5P

🎨Watch My Full Roblox GUI Tutorial Series:
https://www.youtube.com/playlist?list=PLQ1Qd31Hmi3Xnlu8u9hCYClLurMQYJIrz

🔴Watch My Full Roblox ADVANCED Scripting Tutorial Series:
https://www.youtube.com/playlist?list=PLQ1Qd...

▶ Play video

Learn how to implement camera manipulation in your Roblox games! It can allow you to add things like spectate mode GUI, shift to sprint, cinematic cameras, etc.

PATREON🎁
Get Access To My Scripts + More Perks By Becoming a Patreon Member! 👇
https://www.patreon.com/BrawlDev

DISCORD 📜
Join my Discord Community if you want scripting help,...

▶ Play video
dry dagger
#

Thx