So i made a script that makes your CurrentCamera follow a part. Now i have this in a loop so that it will auto-update. Is there a way i can set CurrentCamera to Custom on a KeyPress without having the camera go back to following the part? Aka breaking the loop to follow the part.

Thanks!

EDIT:

local Mouse = game.Players.LocalPlayer:GetMouse()
local playerz = game.Players.LocalPlayer.Character
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = game.Workspace.CurrentCamera
local offset = Vector3.new(0,15,0)

Mouse.KeyDown:Connect(function(key)
	if key == "f" then
		if playerz:FindFirstChild('Humanoid') then
		playerz.Head.CFrame = CFrame.new(workspace.Plane.Plane.SpawnPart.Position)
		game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
		end
	end
end)

game:GetService("RunService").RenderStepped:Connect(function()
repeat
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.PART.CFrame + offset
end)

4 comments

0

can you include your code

0

Please include your code, thanks.

0

Done!

0

Please Help!