So basically I was wondering how would I go about making it so all players in the game look at the same place at the same time by a function. So when I type something like cameraLook() all the players in game would look at the particular spot and then being able to go back to normal with another function? So like they look at that spot for about 10 seconds then they all go back to their normal camera angles from their character angles.
COMMUNITY QUESTION
how to make so all players look out of a camera at the same time by function?
1 answer
Cameras are Client-Side, so you might wanna use a RemoteEvent so every Client-Side scripts listening to the RemoteEvent's (fired) function is heard. Thus you must also store a variable as an identifier for the remote Event! (I am not so good in explaining but please reconsider ;p)
local RemoteEvent = game:GetService("ReplicatedStorage").RemoteEvent
Server Side Script: (Fires the function to every Client in-game)
RemoteEvent:FireAllClients()
LocalScript: (Waiting for the RemoteEvent to be Fired)
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function() -- will be fired if ':FireAllClients' or ':FireClient()' is executed.
-- ....... Camera Script
end)
(I am not so good in explaining but please reconsider ;p) If I am wrong then please, kindly explain;
But hopefully it helps you.
This discussion is preserved as it was. New answers, comments, and votes are closed.
