Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a "graphics" slider?

Asked by 10 years ago

I am currently making a game which feature my own graphics slider to remove crumbs (bushes, flowers, and tall grass) and loose bricks, wood, or dirt from the map.

Here is the code I am using. (I made it myself, and I am an amateur at scripting GUIs.) And I haven't made the GUI yet, either, as I am not good at make sliding GUIs. Perhaps a number GUI would work. From a value of 0-1.

And the crumbs and debris are put into different players. So if one has his or her graphics settings down, then everyone who has their's up can still see the extra detail or vice versa.

local crumbs = game.Workspace.Players.ObjCrumbs
local debris = game.Workspace.Players.ObjDebris

if findFirstChild("GraphicsSlider")
    then
    if GraphicsSlider.Value = 0
        then
        findFirstChild.game.Worksapce.Players.crumbs
        crumbs(Destroy) else
        crumbs(Keep)

        if GraphicsSlider.Value = 0
            then
            findFirstChild.game.Workspace.Players.crumbs
            crumbs(Destroy) else
            crumbs(Keep)
        end
    end
end

1 answer

Log in to vote
0
Answered by 10 years ago

Try a "click" function on a gui arrow so people can browse, then use the Tween function to move it across the screen, example below

    GUIOrFunction:TweenPosition(UDim2.new(0, 100,0, 300), "Out", "Quad")

Now that's just an example, you'll have to mess around with it to find out how you like it.

Ad

Answer this question