I'm making a nature exploration-esque game and I'm inserting text into a GUI and I want to use Enter to advance the text. How would I do it?
Thanks!
I'm making a nature exploration-esque game and I'm inserting text into a GUI and I want to use Enter to advance the text. How would I do it?
Thanks!
Use key:byte()
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.KeyDown:connect(function(key)
if key:byte() == 13 then --the code for enter is 13
--Advance the text
end
end)
I'll try this in a bit
Didn't work... I'll instead use a TextButton
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
You would want to use Keydown or UserInputService, we can not make the script for you.
http://wiki.roblox.com/index.php?title=Taking_keyboard_input#Full_list, enter is 13.