Hello developers, I was wondering how I can make it so that when you enter something in on a textbox, and then presses the enter button, it appears on a text lable for everyone. Heres my script, but it only appears for one person (In a local script)
local SLT = script.Parent.SLT
SLT.Y7.Rounded.Enter.MouseButton1Click:Connect(function()
script.Parent.Main.TT7.P1.Text = "Period 1: "..SLT.Y7.Rounded.P1E.Text
script.Parent.Main.TT7.P2.Text = "Period 2: "..SLT.Y7.Rounded.P2E.Text
script.Parent.Main.TT7.P3.Text = "Period 3: "..SLT.Y7.Rounded.P3E.Text
script.Parent.Main.TT7.P4.Text = "Period 4: "..SLT.Y7.Rounded.P4E.Text
end)
-- Year 8 Time Table
SLT.Y8.Rounded.Enter.MouseButton1Click:Connect(function()
script.Parent.Main.TT8.P1.Text = "Period 1: "..SLT.Y8.Rounded.P1E.Text
script.Parent.Main.TT8.P2.Text = "Period 2: "..SLT.Y8.Rounded.P2E.Text
script.Parent.Main.TT8.P3.Text = "Period 3: "..SLT.Y8.Rounded.P3E.Text
script.Parent.Main.TT8.P4.Text = "Period 4: "..SLT.Y8.Rounded.P4E.Text
end)
-- Year 9 Time Table
SLT.Y9.Rounded.Enter.MouseButton1Click:Connect(function()
script.Parent.Main.TT9.P1.Text = "Period 1: "..SLT.Y9.Rounded.P1E.Text
script.Parent.Main.TT9.P2.Text = "Period 2: "..SLT.Y9.Rounded.P2E.Text
script.Parent.Main.TT9.P3.Text = "Period 3: "..SLT.Y9.Rounded.P3E.Text
script.Parent.Main.TT9.P4.Text = "Period 4: "..SLT.Y9.Rounded.P4E.Text
end)
-- Year 10 Time Table
SLT.Y10.Rounded.Enter.MouseButton1Click:Connect(function()
script.Parent.Main.TT10.P1.Text = "Period 1: "..SLT.Y10.Rounded.P1E.Text
script.Parent.Main.TT10.P2.Text = "Period 2: "..SLT.Y10.Rounded.P2E.Text
script.Parent.Main.TT10.P3.Text = "Period 3: "..SLT.Y10.Rounded.P3E.Text
script.Parent.Main.TT10.P4.Text = "Period 4: "..SLT.Y10.Rounded.P4E.Text
end)
-- Year 11 Time Table
SLT.Y11.Rounded.Enter.MouseButton1Click:Connect(function()
script.Parent.Main.TT11.P1.Text = "Period 1: "..SLT.Y11.Rounded.P1E.Text
script.Parent.Main.TT11.P2.Text = "Period 2: "..SLT.Y11.Rounded.P2E.Text
script.Parent.Main.TT11.P3.Text = "Period 3: "..SLT.Y11.Rounded.P3E.Text
script.Parent.Main.TT11.P4.Text = "Period 4: "..SLT.Y11.Rounded.P4E.Text
end)
-- Year 12 Time Table
SLT.SF.Rounded.Enter.MouseButton1Click:Connect(function()
script.Parent.Main.TT12.P1.Text = "Period 1: "..SLT.SF.Rounded.P1E.Text
script.Parent.Main.TT12.P2.Text = "Period 2: "..SLT.SF.Rounded.P2E.Text
script.Parent.Main.TT12.P3.Text = "Period 3: "..SLT.SF.Rounded.P3E.Text
script.Parent.Main.TT12.P4.Text = "Period 4: "..SLT.SF.Rounded.P4E.Text
end)
I just dont know how do to this in a script instead of a local script, so if anyone can help, it would be highly appriciated.