✓ Accepted answer
A lot of what you're wanting is just logic, which I'll leave for you to figure out, but the knowledge you'll require will include:
- Looking up what things are available in the API, such as here for the TextBox: https://developer.roblox.com/en-us/api-reference/class/TextBox - for example, for a TextBox you might want to know when they press "Enter" for a text box, or that to access the existing text you need the
.Text property. If you look up TextButton (you can use the search bar at the top right of the API pages), the event you want is Activated, which triggers whenever someone clicks on it. In the API pages they often have examples that show you basic usage.
- If you want to get fancy when screens appear/disappear you'll benefit from using the TweenService
- If you don't have a good handle on how to listen to events, Roblox has a fair article on it: https://developer.roblox.com/en-us/articles/events
- If you aren't familiar with Lua's syntax, you can find any tutorial online, or read the manual: https://www.lua.org/pil/contents.html - you probably don't need much syntax to do the basics, just what's shown on that Events tutorial page.
- If by "login system" you just mean those values you mentioned (and no others), the process is much easier (as you just compare the text they entered to the values you're interested in), but if you want to have an account creation system for whatever reason, you'll need to keep track of information in data stores.
As you continue learning, you'll be able to ask more specific questions of your preferred search engine or here (but most questions of the form "How do I do [some basic thing in Lua/Roblox]?" have readily available answers).
One note, Roblox's article on events doesn't mention that you can use anonymous functions, which are fine if you don't need to call the function anywhere else. For example:
local Players = game:GetService("Players")
local function onPlayerAdded(player)
local function onCharacterAdded(character)
print(player.Name .. " spawned in: " .. character:GetFullName())
end
player.CharacterAdded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
print(player.Name .. " spawned in: " .. character:GetFullName())
end)
end)
Note that having an onPlayerAdded function (that isn't anonymous) is actually a good idea if you want to ensure that Roblox doesn't put your player into the server in Play Solo mode before your script has a chance to connect to the event - this doesn't happen online but can in testing; the work-around is this:
local Players = game:GetService("Players")
local function onPlayerAdded(player)
player.CharacterAdded:Connect(function(character)
print(player.Name .. " spawned in: " .. character:GetFullName())
end)
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in ipairs(Players:GetPlayers()) do
onPlayerAdded(player)
end
9 comments
This isn't a request site.
"boo hoo this isn't a request site" - How do I do this then?
@Ondrashek06, I suggest posting this on the developer forums.
https://devforum.roblox.com/
[Edited: bullet points require a blank line before they start or else they don't appear.]
I am permanently banned from the devforums. I cannot post there.
I don't know why you're banned but you can search for an existing post, or make a new account and then post your question.
Ondrashek, you should consider reading rule #1.
How am I a jerk?