Hi! I’m trying to do Intro when joining the game. There will be a message, and couple seconds later, a SubText shows up with a message “Press “E” to skip.” Once clicking E, another text starts appearing, wait couple seconds and you can skip with E! But I have no idea how to do that.
Edit: i rewrote this entire thing, it was confusing.
local sg = game:GetService("StarterGui")
local uis = game:GetService("UserInputService")
local label = nil -- change nil to the refernce of your label
local nextLabel = nil -- change nil to your next labe after skipping
uis.InputBegan:Connect(function(input, gameProcessed)
if input == Enum.KeyCode.E and not gameProcessed then
label.Visible = false
nextLabel.Visible = true
end
end)
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local Character = player.Character or player.CharacterAdded:Wait()
local MainText = script.Parent.MainText
local Intro = script.Parent.Parent
local function typeWrite(text)
for i = 1, #text do
MainText.Text = string.sub(text, i, 1)
wait(0.05)
end
end
I did it! I somehow managed to do it. If you want to know - first i made this:
local Skip1 = false
local Skip2 = false
And each skip is how many times i want to skip. I then made a InputBegan function and made this:
if Skip1 == true and Input.Keycode == Enum.Keycode.E then
--Do something
elseif Skip2 == true and Input.Keycode == Enum.Keycode.E then
--do something
end
end