My goal in this game is to have a camera that changes it's view to show kind of an overview of the town during an ending credits scene, my current script goes as followed.
local camera = game.Workspace.CurrentCamera
(stuff not relating to camera)
camera.CameraType = "Scriptable" camera.CFrame = workspace.camview.CFrame
It is just simply not changing the view, is there any reason as to why this may be happening?
Like did roblox change how the script is supposed to work since I last did this?
EDIT:
I have modified the script to now be
local camera = game.Workspace.CurrentCamera local camview = game.Workspace:WaitForChild("camview")
(split)
camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = camview.CFrame
Still does not work
EDIT 2:
Isolated everything into a game of it's own,
currently my scripts go as follows:
In StarterGui,
LocalTest:
local TouchDetector = game.Workspace.TD local module = require(script.Parent:WaitForChild("ModuleTest")) TouchDetector.Touched:Connect(function() module.Test() end)
ModuleTest:
local module = {} local replicatedStorage = game:GetService("ReplicatedStorage") function module.Test() replicatedStorage.Remotes.Test:FireServer() end return module
Remote event "test" is fired
In ServerScriptService:
TestScript:
local replicatedStorage = game:GetService("ReplicatedStorage") local camera = game.Workspace.CurrentCamera local camview = game.Workspace:WaitForChild("camview") replicatedStorage.Remotes.Test.OnServerEvent:Connect(function(player) wait(1) --not in actual game, just to simulate a delay camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = camview.CFrame end)
doesn't work
ok I solved it,
what I had to do was enable a script in StarterGui and used pretty much the same code but in that script.
either I'm stupid or roblox is stupid but I fixed it.
This tutorial worked for me, it will probably help to clear things up. https://www.youtube.com/watch?v=bkDp4fRbVZU