Optimize for concert stage

I want to simulate a concert stage with a controller that can change the angle, color, brightness, etc. of light.

image

image

What method should I use?

  1. Client => Server
    When a player change the setting from controller it will fire remote event and change from server

  2. Client => Server => All Client
    When a player change the setting from controller it will fire remote event to server and server will fire all client and change from client

1 Like

The first one will cause the server to handle the movement of lighting, (using loops, tweens, etc) Making the server to carry with those calculations. And every player in server will see that change.

The second one, will give the loops, tweens to the client, so each device will carry with those calculations, and all players in server will see the change only, if all of them are fired with the RemoteEvent from server.

Mainly depends on you, if you want to make the server to handle with those calculations, or you want each client device to do it, and if you want to keep some players to not be affected by too, like, me as a client I dont wanna see the FX, so you could cancel it specially for me, if you are using the second option, otherwise, all clients are forced to see what server is doing

1 Like

You can create a “Configuration” folder, with all settings as differents “Values” inside, so you only have to change these values in server side, and then in client side you do the changes and animations in workspace using these values.

1 Like
  1. Client

you can just track the game time and do some calculations with that, and you can change the script.RunContext to client

an example:

local RunService = game:GetService("RunService")

local LightPart = script.Parent
local GetTime = time 

RunService.RenderStepped:Connect(function()
	LightPart.Orientation = Vector3.new(
		-90 + math.deg(math.tanh(math.sin(GetTime()))),
		math.deg(math.tanh(math.sin(GetTime()))), 
		0
	) -- dude what are these math functions
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.