#can somebody review my code

1 messages · Page 1 of 1 (latest)

strong locust
#

relatively new to scripting and first time working w camera

#

lmk if theres any problems with it

half granite
#

is there any reason it need to have server side script?

hearty orchid
#

if actionType == "Toggle" then hard codes

#

if actionType == "Toggle" then

#

Use player.UserId

half granite
#

i mean, from my experience. having ServerScript are unnecessary for spectating system.
PlayerAdded and PlayerRemoving function can be used in LocalScript.

hearty orchid
#

how will client know when to spectate?

#

who to spectate?

#

when to stop?

half granite
#

just make Local Spectating = {}
inside Local Script
it can be 100% Local because Spectate are only affect one person that use

hearty orchid
#

server needs to broadcast the client who will they spectate

#

when

#

a client cant know whom to spectate

#

it's always from server

half granite
#

it can

narrow apexBOT
#

studio** You are now Level 1! **studio

hearty orchid
#

and u lose control

#

but certain cases, u can do spectate on client fully

#

certain cases, u cant

#

both methods work

half granite
#

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.