What do you want to achieve?
Trying to fix this issue, I know you cant access the players camera in the server but you can if you use a RemoteEvent and that doesnt work for me at the moment…
What is the issue?
Can’t access Players camera in the server even with RemoteEvents
What solutions have you tried so far?
i have looked everywhere about this issue and i couldn’t find anybody talking about it, theres only demonstrations on how to get the camera in the server, i’ve tried it and it doesnt work, please tell me the issue if you can
Heres both the client script that fires the event, and the server that picks it up.
-- Server Script:
RS:WaitForChild("GetPlayerCam").OnServerEvent:Connect(function(Player, Camera)
if Camera then
print("Camera Found")
else
print("no cam")
end
end)
-- Local Script:
local Camera = game.Workspace.CurrentCamera
wait(1)
game:GetService("ReplicatedStorage"):WaitForChild("GetPlayerCam"):FireServer(Camera)
It depends on where the local script is. If it’s in the starter scripts, it will pass the camera very early. If it’s in the character, it will pass the camera from the character. That is my theory. You could try and pass the camera after the character loads.
local Camera = game.Workspace.CurrentCamera
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function()
game:GetService("ReplicatedStorage"):WaitForChild("GetPlayerCam"):FireServer(Camera)
end)
end)
Correct, if you need to pass information about a client’s camera to the server (i.e; its CFrame) then you’d need to explicitly pass that instead, for example.