Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a way to keep switching the players camera, more than twice?

I'm not sure if it's normal or not, but I can only switch the player's camera twice. But If they reset, they can do it twice again. One script, this one switches the player's camera to the part. The other switches it back to the player. In total, it will just switch to the part, and back to the player. Oh, yeah and I have a click detector with 2 scripts, than enable these, when clicked. Its a function, its the best way I could find out how to do it.

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace:WaitForChild("Camera")
local camera = workspace:WaitForChild("CameraPart")
repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = camera.CFrame
script.Parent.CameraEnabler.Disabled = true

1 answer

✓ Accepted answer

Unless I'm wrong, you could use TweenService on your camera to repeat it as many times as you want... If that's what you're asking.

4 comments

0

I haven't used that before, so Ill need to test it

0

Would you happen to know an example..?

0

https://developer.roblox.com/en-us/api-reference/function/Camera/Interpolate/index.html You could read up on this, it shows you about camera manipulation with Tweening.

0

Thanks, Ill check it out.

This discussion is preserved as it was. New answers, comments, and votes are closed.