I tried to make video system recording player’s move in live.
but it not catching any type of movement.
Client script triggering the event
:
local RS = game:GetService("RunService")
local CameraSystem = game.ReplicatedStorage.CameraSystem
local GUI = script.Parent
local Viewport = GUI.ViewportFrame
local cam = workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Follow
Viewport.CurrentCamera = cam
local Connection = nil
local mirror = game.Workspace:WaitForChild("Mirror")
Connection = RS.Heartbeat:Connect(function()
CameraSystem:FireServer(GUI, Viewport, cam, mirror)
Connection:Disconnect()
--clearMap()
--cloneMap()
print("YOLO")
end)
Server script receiving the event
:
local CameraSystem = game.ReplicatedStorage.CameraSystem
local CurrentPlayer = nil
local GravityTest = game.Workspace.GravityTest
CameraSystem.OnServerEvent:Connect(function(player, gui, viewport, cam, mirror)
CurrentPlayer = game.Workspace:FindFirstChild(player.Name)
local mirror = game.Workspace:WaitForChild("Mirror")
for _, Part in pairs(viewport.Map:GetChildren()) do
Part:Destroy()
end
for _, Part in pairs(workspace:GetChildren()) do
if Part.Name == "Terrain" then
continue
end
if Part:IsA("BasePart") or Part:IsA("Model") then
Part.Archivable = true
local NewPart = Part:Clone()
NewPart.Parent = viewport.Map
end
end
end)
They based on - https://youtu.be/9WKGolPdAOU
How should I do in this situation?