My goal is if I have a Cutscene playing, it will destroy that copy and reset the camera.
The issue is that it won’t play the cutscene nor will reset after I destroy the Cutscene Script.
I’ve tried viewing the developer site to find issues, the print command and nothing works. It says that everyone is correct but I have no idea how to play it. I use Clonetroopers Camera Cutscene player. What do I do?
My goal overall is to make it where if it finds the script inside of the folder in workspace, it destroys it then resets everyones cam back to being on their own character. If it doesn’t find the camera script, it then plays the camera script, then returns to the current camera value or reset it.
All of this runs through an event to do this. I do not want it where others can control this, I want it so I can fix peoples cameras when I need to, just in-case it’s a cutscene I want to stop… I can stop it properly.
So On is to check to see if he camera is already active or inside of the folder and if it is then it then it deletes it instantly and resets the players camera instantly. If it isn’t, it copies and moves it to the folder then plays it, then once the script is done, it returns the players camera back to the original camera or resets it.
Off is to fix everyones camera by resetting them entirely. This means everyone in the game.
--Made By MillerrIAm
-------------------Variables------------------
Cutscenes = game:GetService("ServerStorage").Cutscenes
CutscenePlayer = game:GetService("Workspace").CutscenePlayer
Event = game.ReplicatedStorage.GUIEvents.CutscenePlayer
------------------Main Script------------------
Event.OnServerEvent:Connect(function(plr,Play,argument)
if Play == "On" then
if CutscenePlayer:FindFirstChild(""..argument) then
CutscenePlayer[""..argument]:Destroy()
for i,x in pairs (game.Players:GetPlayers()) do
i = game.Workspace.CurrentCamera
i:Destroy()
wait(.1)
i.CameraSubject = x.Character.Humanoid
i.CameraType = Enum.CameraType.Fixed
end
else
Cutscenes[""..argument]:Clone().Parent = CutscenePlayer
for i,x in pairs (game.Players:GetPlayers()) do
i = CutscenePlayer[""..argument]
i.Disabled = false
end
end
elseif Play == "Off" then
if CutscenePlayer:FindFirstChild(""..argument) then
CutscenePlayer[""..argument]:Destroy()
end
end
end)
print("ScriptWorking")
Yes, this script is server sided and it’s changed through a local script. A GUI button changes it, now if I can activate the Camera Cut to work which yes, this is possible… that would be all I need.
Any tips for Cameras on ROBLOX?
In my opinion, the way you’re doing this seems inefficient. Instead of enabling and disabling a cutscene script, you should just use the built in feature FireAllClients (or just FireClient) for the cutscenes, and setting the CFrame (maybe using a configuration object with 2 Vector3s meaning a position and a direction would work?) would be better. All camera work should be done on the client, the CFrame sending done on the server. Or, it could just be both client sided.
That should activate and disable the camera correctly.
Well you see, I know a good amount about scripting but I’m not exactly good on how cameras work on ROBLOX… with this, I use CloneTroopers Cutscene Maker or Cutscene Editor to make Cutscenes so i’d have to balance it with that.
I think CloneTrooper’s cutscene maker is deprecated, from what I know. Cameras are really simple, they have a CFrame value and a few functions. The CFrame value of a camera is very simple to set, it’s just like how you’d set a part’s CFrame. You can tween the camera’s CFrame value to make a cutscene by tweening them from one CFrame to another.
Apologies but I do not know much about CFraming either. I know what it is but I don’t know how they’re done exactly. If I did it this way, would it be possible to make it where I reset all players cameras as well? That’s the main reason i’m here. If I can figure that out, I can figure everything else to a T.
CFrame values are very simple. You can take them as two Vector3 values, which are position and direction. The position, of course, is the position of where the camera is. The direction is the direction the position is pointing to.
If you want to have a reliable switch on and off cutscene script, you are going to use two camera enums. Scriptable and Custom are the two camera enums needed to set the CFrame of the camera reliably if you know how to use it correctly.
Scriptable basically means you can set the camera’s CFrame without it being reset to a position, while Custom is the original camera type, meaning the camera would be set back to the character humanoid if the camera type was set back to Custom.
You would set the CameraType to Scriptable, and then set the camera’s CFrame to some cutscene CFrame value to make it switch on. You would set the CameraType to Custom to make it switch off. It’s pretty simple if you know how to execute it correctly.