Hello, So basically I’m trying to make a jumpscare script and the issue I’m having is when the camera CFrame won’t change to the Jumpscare Camera CFrame. What I mean is the Jumpscare Part also move and is animated but when I’m calling the Cutscene event it won’t change the camera Cframe but only once.
Is there a way i could make it so that the camera CFrame is always on the jumpscare part cframe?
local Hum = script.Parent.Zombie
local Animator = Hum.Animator
local JumpscareAnim = script.Parent.Jumpscare
local Track = Animator:LoadAnimation(JumpscareAnim)
local Db = false
local CutsceneEvent = game.ReplicatedStorage.Events.CutsceneControl
script.Parent.Torso.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
Hum.WalkSpeed = 0
if not Db then
Db = true
CutsceneEvent:FireAllClients("Start",hit.Parent.Head,script.Parent.Head.JumpscareCamera,0.5)
Track:Play()
Track.Stopped:Wait()
task.wait(.2)
hit.Parent.Humanoid:TakeDamage(100)
task.wait(5)
CutsceneEvent:FireAllClients("Stop")
Db = false
Hum.WalkSpeed = 11
end
end
end)```
Wouldn’t changing the camera type to scriptable and setting the CFrame makes it unmovable? Or after running the cutscene and when the camera is pointing towards the target position then just set it to fixed?
local CameraEvent = game.ReplicatedStorage.Events:WaitForChild("CutsceneControl")
local TweenService = game:GetService("TweenService")
local Camera = game.Workspace.Camera
local Player = game.Players.LocalPlayer
local PlayerCharacter = Player.Character or Player.CharacterAdded:Wait()
local function TweenCamera(point1,point2,CutsceneTime)
local tweenInfo = TweenInfo.new(
CutsceneTime,
Enum.EasingStyle.Quad,
Enum.EasingDirection.In,
0,
false,
0
)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = point1.CFrame
local Tween = TweenService:Create(Camera,tweenInfo,{CFrame = point2.CFrame})
Tween:Play()
end```
Sorry for late respond. But hey I already fixed the camera issue by creating new event to toggle the jumpscare and use renderstepped to make it so it keep facing the front surface of the jumpscare part.