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

Camera Interpolation Is Killing Player?

Asked by
Donut792 216 Moderation Voter
5 years ago

so like the title says i have a camera interpolation script that works fine but once it finishes it just repeatedly kills the player over and over

Script:

01local list = {38270341, 131541716, 41163273, 132007993, 552452701, -1}
02 
03game.Players.PlayerAdded:Connect(function(player)
04        player.CharacterAdded:Connect(function(char)
05        for i = 1, #list do
06              if player.UserId == list[i] then
07                local gui = script.TrueDarkness:Clone()
08                gui.Parent = player.PlayerGui
09                warn("Gave "..player.Name.." True Darkness!")
10            end
11        end
12    end)
13end)
14 
15--Misfortune comes uninvited.' It hungers for blood, craving eternal darkness. The time to repent is over! I will take up arms again, step out of the shadows, and teach them true darkness!
View all 67 lines...

LocalScript:

01local Caster = script:WaitForChild("Caster")
02local CastValue = Caster.Value
03local camera = game.Workspace.CurrentCamera
04local Character = game.Workspace:FindFirstChild(CastValue)
05local plr = game.Players.LocalPlayer
06camera.CameraType = Enum.CameraType.Scriptable
07camera:Interpolate(Character.Head.CFrame, Character.Head.CFrame, 2)
08wait(1)
09wait(2)
10camera:Interpolate(plr.Character.Head.CFrame, plr.Character.Head.CFrame, 1)
11wait(1)
12camera.CameraType = Enum.CameraType.Custom

1 answer

Log in to vote
1
Answered by
mist0s 38
5 years ago

Hello, I had the same problem, and the problem is that you can't put the same things in the interpolate (you put 2 times Head). For resolving, you have to change one of the parameter.

0
alright thank you Donut792 216 — 5y
Ad

Answer this question