Actual behavior: No matter if this attribute is set to true or false, the slider will be enabled in the GUI and will function as if it was enabled.
Expected behaviour: The slider accurately reflects the current setting of the `enabled` attribute at any point in time.
Minimal example to reproduce:
- start a new default settings save file
- run the below code in game in the chat/command line:
Code: Select all
/c
local player=game.player
local gui=player.gui
local screen=gui.screen
local slider = screen.add{
type="slider",
name="bugged_slider",
minimum_value=0,
maximum_value=10,
enabled=false
}
To verify if the slider should actually be disabled:
Code: Select all
/c
local player=game.player
local gui=player.gui
local screen=gui.screen
local slider=screen.bugged_slider
game.player.print(slider.enabled)
Workaround to the problem:
Code: Select all
/c
local player=game.player
local gui=player.gui
local screen=gui.screen
local slider=screen.bugged_slider
slider.enabled=false