Can using local scripts to alter GUI elements cause any sort of network/server/connection-based lag?
I know local scripts are done client-side, but since LUA is modular, could a local script cause any sort of connection/server/network based lag? As in, non performance/framerate related. Additionally, I'm not sure if this local script that changes GUI text is doing any sort of slow-down by doing a constant check for a specific value, if so, what could I do differently?
Sorry for my lack of terminology and coding knowledge, but, TLDR; will Local Scripts, and in particular, this script cause any sort of slow-down?
01 | script.Parent.Text = notification.Value |
03 | notification.Changed:connect( function (property) |
04 | script.Parent.Text = notification.Value |
05 | if notification.Value = = "29" then |
06 | script.Parent.TextColor 3 = Color 3. new( 1 , 1 , 0 ) |
07 | elseif notification.Value = = "19" then |
08 | script.Parent.TextColor 3 = Color 3. new( 1 , . 5 , . 5 ) |
09 | elseif notification.Value = = "10" then |
10 | script.Parent.TextScaled = true |
11 | script.Parent.TextColor 3 = Color 3. new( 1 , . 25 , . 25 ) |
12 | elseif notification.Value = = "5" then |
13 | script.Parent.TextColor 3 = Color 3. new( 1 , 0 , 0 ) |
14 | elseif notification.Value = = " " then |
15 | script.Parent.TextScaled = false |
16 | script.Parent.TextColor 3 = Color 3. new( 1 , 1 , 1 ) |