What do you want to achieve? Keep it simple and clear!
I want my Camera Manipulation to work when a ClickDetector is Clicked. Every Model has Camera Model on it
When I click the click detector, I want the script to activate the Camera Manipulation and determine which camera will provide the cframe position to the camera manipulation. Because each model in the Folder contains a Part named “Cam,” which is the camera cframe, I don’t want GetDescendants to choose a random camera and manipulate a random position from the other model.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried searching a same topic to mine but none is helpful
Sorry if my explanation is bad because its hard to explain
local camera = workspace.CurrentCamera
local looking = false
--> put the CFrame of where you want the camera to end up here
local tweentime = 1
local debouncetime = 0.5
local active = false
game.Workspace.CanariaSci.main2.OnClientEvent:Connect(function(plr, btn)
local endCFrame = CFrame.new(btn.Parent.Parent.Cam.Position)
print("delivered")
if active then return end active = true
looking = not looking
if looking then
camera.CameraType = Enum.CameraType.Scriptable
game.TweenService:Create(camera, TweenInfo.new(tweentime, Enum.EasingStyle.Sine, Enum.EasingDirection.Out,0,false,0), {CFrame = endCFrame}):Play()
wait(tweentime+debouncetime)
else
camera.CameraType = Enum.CameraType.Custom
wait(debouncetime)
end
active = false
end)
I think, if this makes sense, you can (maybe) only change the camera in/from the StarterGui. And it might not work because it’s in the ServerScriptService (I think it’s there). I don’t always do Camera Manipulation, and when I do, I do it from the StarterGui.