Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My GUI gives the default text when I type something in? Why?

(gif example: https://gyazo.com/c7b1d1d7ed98fb2a1552e10c360f8e80 ) Hello, people. I am trying to make a GUI that sends messages but it's not working and I don't know why. LogCreator:

script.Parent.Parent.Parent.Parent.Parent.Events.Send.OnServerEvent:Connect(function(text)
	local lines = script.Parent.Parent.Parent
	lines.Q.Text = lines.P.Text
	lines.P.Text = lines.O.Text
	lines.O.Text = lines.N.Text
	lines.N.Text = lines.M.Text
	lines.M.Text = lines.L.Text
	lines.L.Text = lines.K.Text
	lines.K.Text = lines.J.Text
	lines.J.Text = lines.I.Text
	lines.I.Text = lines.H.Text
	lines.H.Text = lines.G.Text
	lines.G.Text = lines.F.Text
	lines.F.Text = lines.E.Text
	lines.E.Text = lines.D.Text
	lines.D.Text = lines.C.Text
	lines.C.Text = lines.B.Text
	lines.B.Text = lines.A.Text
	lines.A.Text = script.Parent.Text
end)

Controller:

local input = game:GetService("UserInputService")

input.InputBegan:Connect(function()
	if Enum.KeyCode == Enum.KeyCode.RightShift then
		script.Parent:CaptureFocus()
	end
end)

script.Parent.FocusLost:Connect(function()
	script.Parent.Parent.Parent.Parent.Parent.Events.Send:FireServer(script.Parent.Text)
end)

Thank you for the help!

3 comments

0

Sorry I can't fix it. I'll try to help another time

0

THEN WHY DID YOU COMMENT ON HERE BRUH

0

BRUH

2 answers

Try this for your Log Creator script!

script.Parent.Parent.Parent.Parent.Parent.Events.Send.OnServerEvent:Connect(function(text)
    local lines = script.Parent.Parent.Parent
    lines.Q.Text = lines.P.Text
    lines.P.Text = lines.O.Text
    lines.O.Text = lines.N.Text
    lines.N.Text = lines.M.Text
    lines.M.Text = lines.L.Text
    lines.L.Text = lines.K.Text
    lines.K.Text = lines.J.Text
    lines.J.Text = lines.I.Text
    lines.I.Text = lines.H.Text
    lines.H.Text = lines.G.Text
    lines.G.Text = lines.F.Text
    lines.F.Text = lines.E.Text
    lines.E.Text = lines.D.Text
    lines.D.Text = lines.C.Text
    lines.C.Text = lines.B.Text
    lines.B.Text = lines.A.Text
    lines.A.Text = text
end)

If it didn't work don't hesitate to say something!

2 comments

0

LOL i replaced text with script.Parent.Text because it errored

0

So... Did it work or?

On line 4, right after the "if", you need to put "input" not "Enum". Not sure if that sentence was a bit confusing so this is what line 4 in your script should be:

if input.KeyCode == Enum.KeyCode.RightShift then

Hope this helps!

1 comment

0

that wasn't it, it was the fact that the script gets the old message and not the new one

This discussion is preserved as it was. New answers, comments, and votes are closed.