The title says it all but basically I am making a horror game and don’t want the same cutscene for each map. How do I do this?
I am not asking for scripts just a bit confused on what to do
The title says it all but basically I am making a horror game and don’t want the same cutscene for each map. How do I do this?
I am not asking for scripts just a bit confused on what to do
In each map, have a folder of invisible camera parts. Order these parts somehow by naming them with numbers. Then, when a map loads, the script will tween the player’s camera to each camera part’s CFrame. It would look something like this:
for i, object in pairs(map.Cutscene:GetChildren()) do
for _, v in pairs(map.Cutscene:GetChildren()) do
if v.Name == tostring(i) then
local tweenInfo = TweenInfo.new(
2, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
true, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
TweenService:Create(camera, tweeninfo, {CFrame = v.CFrame}):Play()
wait(2) -- Put the length of the tween here
end
end
This may not be the best way of doing it as I’m not all that advanced in scripting but I think it should work