Having problems with click interface for my game?

I am making a new game called, Roblox Dancing Line. I’ve made different maps but I don’t know how to condone a chosen map to be clicked. I don’t know if I am to make a UI for a ButtonClick. The game is more meant for mobile players.
image

2 Likes

I would use a UI for quality UX and Performance purposes.

1 Like

Thank you.

1 Like

What you can do is make all the maps into a decal (preferably transparent), and just preload them when the player joins, so when they get to see the menu, it would be really nice and smooth. If you want to make a nice effect (such as the one above in the OP), I’d recommend using GuiObject:TweenSIzeAndPosition.

3 Likes

You should use TweenService over the GuiObject tween methods, since TweenObjects provide far more functionality and accessibility. This is when it comes to Gui effects.

cc @AbiZinho


It seems more like you don’t know where to begin, over having an actual problem for your UI. In this case, you have multiple ways on how you can set up your UI. ViewportFrames and decals are the two go-to methods for such a system, especially ViewportFrames with their rising popularity.

The ScreenGui object is what you’ll need to get an actual interface into the game. From there, you can use TextButtons, ImageButtons or whatever you’d like. In the end, the point is that you have a way for players to interact so that the client can capture input and move your interface around that way.

There are members of GuiButtons (what the TextButton and ImageButton objects derive from) and the UserInputService that support such things. For example, if you want to make a TextButton use input objects only and be able to work with both PC and mobile, you can do something like this:

TextButton.InputBegan:Connect(function (InputObject)
    if InputObject.UserInputType == Enum.UserInputType.MouseButton1 or InputObject.UserInputType == Enum.UserInputType.TouchTap then
        -- Your code
    end
end)

I would personally recommend a 2D Gui as previously suggested. From here, you can add your own logic to make a cycle of maps to choose from, as you want.

If you’re not up for learning quite yet how to make your own scroll map, you can use the UIPageLayout object which makes the Gui engine handle the cycling work for you - all you need to do is understand how to use the object’s API (i.e. the Previous/Next functions) and how to organise your UI so that it can work as intended.