game.Lightning.Technology can't change from a script

Im trying to make a lighting change gui but it doesn’t let me change it. Im trying game.Lighting.Technology = “Voxel”, game.Lighting.Technology = Voxel, game.Lighting.Technology = Enum.Technology.Voxel won’t change it. If I go into a local server and change it manually it works and on client too. (Technology isn’t a valid parent of Lighting) Any way to change it?

image

12 Likes

I think it’s a specially restricted property you can only set manually. That’s probably to avoid any performance issues?

Edit; yup! See here: https://developer.roblox.com/api-reference/property/Lighting/Technology

5 Likes

This is intended. It is not meant to be changed in runtime.

It only changes when the server is stopped.

1 Like

It should be able to be changed because people lag from ShadowMap etc

8 Likes

I didn’t make decision, I am just giving you the answer.

The reason is that the client has to load in that technology, which is very hard to change once the client is running.

This is not possible due to Roblox probably going to have to change the lighting engine in the client I’ve attempted to do this my self in a local script as well and it had failed. I can only assume it’s due to how they have their rendering code setup.

Im trying to make a gui so players can switch it locally so if they have lag they can change it because graphic settings are weird and you need to go to 2 bars to get rid of shadows

When players change their graphics settings, ShadowMap will update too it.

There is currently no way for developers to do this other than removing parts that are farther away.

1 Like

ok thanks for the help so I didn’t waste anymore time on trying to do it lol

You need to set to 2 bars to remove it and it removes your render distance which I hate

1 Like

The only possible thing you could do is hide parts past a certain radius. That would not really help significantly though.

1 Like

No problem glad to help.
I find that one way to make clients have fewer fps issues is with lowering part count as that ends up lowering the amount that the GPU has to work.
Edit:
One idea I have just thought of is on the client side disabling the shadow setting on all parts via script I haven’t tried this but it can maybe help with this issue.

1 Like

You can’t change Lighting Technology from a script, nor should you be doing that. If you’re having performance issues with ShadowMap, then pick one of these three options:

  • Optimise your game
  • Report reproducible performance bugs through the appropriate channels
  • Don’t use ShadowMap (last resort)

If you want to manipulate graphics on the client, include options such as part count reducers and other ways to modify the map on the client.

1 Like

No, im making a gui so people can toggle it.

…that’s what I suggested? Technology should be set only from Roblox Studio. If your game lags, then optimise it or include settings options for players to reduce lag, along with their graphics sliders.

No people can toggle if locally in-game if they lag too much.

I’m confused as to what you’re disagreeing with and what you’re suggesting be toggled. Please explain (and so that any other reader can also know what you’re referencing).

I have not tried this out (So i won’t know the outcome of this) but will changing the lighting’s technology using loadstring do anything?

Ya know, if you’re using the ShadowMap all parts get a Cast Shadow property right? You can just tick that for every part in the game to prevent shadows. That should help increase performance. Pretty sure @Maximum_ADHD used this method for his game.

1 Like

Nah, I just used the GlobalShadows property and copied the OutdoorAmbient over to the Ambient.

12 Likes