-
What do you want to achieve? Replicated Polaroid Camera on all clients (or server, but I’m sure it’s impossible).
-
What is the issue? I’ve made a very simple polaroid camera tool that’s capable of creating polaroid pictures. It works via ViewportFrames so there’s no way of it working on the server side. It creates separate tool with reference model (polaroid frame) and attaches surface gui with ViewportFrame to the polaroid. The issue with this is that it is not replicated across server or clients, so for other people I’d be holding air with no picture instead of a polaroid.

-
What solutions have you tried so far? So far I tried creating polaroid on server and blatantly cloning viewport to it which obviously didn’t work. I tried creating viewport frame and all the parts from the scratch which lead to even more issues.
The script is quite big so I will send y’all only the most important parts.
- viewmodel - ViewPort Frame
- getObjectsInView() - function that detects instances in camera’s view (model or part)
- addCharacter() - function that creates Humanoid character’s clone.
RS.Heartbeat:Connect(function()
if equipped then
for _, object in ipairs(viewmodel:GetChildren()) do
if not object:FindFirstChildWhichIsA("Humanoid") then
object:Destroy()
else
for _, part in ipairs(object:GetChildren()) do
if part:IsA("BasePart") then
part.CFrame = game.Workspace:WaitForChild(object.Name):WaitForChild(part.Name).CFrame
end
end
end
end
local objects = getObjectsInView()
for _, object in pairs(objects) do
if not object:FindFirstChildWhichIsA("Humanoid") then
local clone = object:Clone()
if clone then
clone.Parent = viewmodel
end
else
if not viewmodel:FindFirstChild(object.Name) then
addCharacter(object)
end
end
end
SpaceCamera.CFrame = attach.WorldCFrame
end
end)
actualtool.Activated:Connect(function()
local tool = Instance.new("Tool")
local handle = game.ReplicatedStorage:WaitForChild("ReferenceModel"):Clone()
handle.Parent = tool
handle:WaitForChild("Handle").Parent = tool
tool.GripPos = Vector3.new(0.9,-0.5,0)
tool.Parent = Player.Backpack
local viewmodelclone = viewmodel:Clone()
local surface = Instance.new("SurfaceGui")
surface.Enabled = false
surface.Parent = Player.PlayerGui
surface.Adornee = handle:WaitForChild("DecalPart")
surface.Face = Enum.NormalId.Back
viewmodelclone.Parent = surface
viewmodelclone.BorderSizePixel = 0
tool.Equipped:Connect(function()
surface.Enabled = true
TS:Create(ActualCamera, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {FieldOfView = 50}):Play()
end)
tool.Unequipped:Connect(function()
surface.Enabled = false
TS:Create(ActualCamera, TweenInfo.new(0.5, Enum.EasingStyle.Quad), {FieldOfView = 70}):Play()
end)
end)

