#can somebody review my code
1 messages · Page 1 of 1 (latest)
relatively new to scripting and first time working w camera
lmk if theres any problems with it
is there any reason it need to have server side script?
yuh
if actionType == "Toggle" then hard codes
if actionType == "Toggle" then
if Spectating[player.Name]["Rotating"] == true then return end
Uh oh, player.Name?
Use player.UserId
i mean, from my experience. having ServerScript are unnecessary for spectating system.
PlayerAdded and PlayerRemoving function can be used in LocalScript.
Server is the one that broadcast
SpectateRemote:FireClient(player, "Toggle") -- make spectate gui visible
how will client know when to spectate?
who to spectate?
when to stop?
just make Local Spectating = {}
inside Local Script
it can be 100% Local because Spectate are only affect one person that use
thats not always the case
server needs to broadcast the client who will they spectate
when
a client cant know whom to spectate
it's always from server
it can
** You are now Level 1! **
then u're not doing server authority
and u lose control
but certain cases, u can do spectate on client fully
certain cases, u cant
both methods work
i know both are work.
but in his case. his use of:
actionType == "Back",
actionType == "Next"
actionType == "TweenComplete"
these function can not belong to Server Side.
it can move to local and leave the "Toggle" to decide in server.