Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am trying to make a KillCam Script. Where should I put the script?

Asked by 4 years ago

Here's the script:

repeat wait() until game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character.Parent ~= nil and game.Workspace.CurrentCamera

local runService = game:GetService("RunService") local player = game.Players.LocalPlayer local character = player.Character local camera = game.Workspace.CurrentCamera

runService:UnbindFromRenderStep("killcam") camera.CameraType = Enum.CameraType.Custom camera.CameraSubject = character.Humanoid

character.Humanoid.Died:connect(function() pcall(function() local killer = character.Humanoid:findFirstChild("creator") if killer then
local alpha = 0.1 --0.5/2 local startCFrame = camera.CFrame local killerChar = killer.Value.Character camera.CameraType = Enum.CameraType.Scriptable runService:BindToRenderStep("killcam", 0, function() if killerChar and killerChar:FindFirstChild("Head") then local endcf = killerChar.Head.CFrame * CFrame.new(0, 5, 10) camera.CFrame = CFrame.new(camera.CFrame:lerp(endcf, alpha).p, killerChar.Head:GetRenderCFrame().p) end end)
end end) end)

0
First of all, format MrCatDoggo 213 — 4y
0
Second this techincally needs no answer. Its actually easy to learn if you look at the camera manipulation wiki page: https://developer.roblox.com/en-us/articles/Camera-manipulation MrCatDoggo 213 — 4y
0
Thanks, it really helped. I have the Killcam working now. Michael78120 1 — 4y

Answer this question