Help making a scoreboard admin panel/gui

Hello, fellow developers!

Around 6 months ago, I posted a topic similar to this one, but the solution to that one no longer works. Here’s the scripts I used:

LocalScript

local box = script.Parent
local txt = box.Parent.Parent.Parent.Scoreboard.Frame.Bottom.inning
local event = script.Parent.Event --make a remote event named "Event"


function change() --I just changed the function a bit.
	event:FireServer(box.Text)
end

box.Changed:Connect(change)

Server Script

local event = script.Parent.Event

event.OnServerEvent:Connect(function(plr, text)
	--you should probably do a security check here so no hacker can use this event.
	for i,v in pairs(game.Players:GetChildren) do --this is to do this for everyone.
		v.PlayerGui.Scoreboard.Frame.Bottom.inning.Text = text
	end
end)

Setup
image

Change this to:
box:GetPropertyChangedSignal("ContentText")

Or if you want this to fire when the player clicks enter then look up on Google detect text box enter key press, because I always for get the function lol

2 Likes

I used box:GetPropertyChangedSignal(“Text”) and it worked perfectly! Thanks so much!

1 Like

I use an event called FocusLost, look it up in the Roblox API documentation. It works when you press enter on the TextBox or click away from it.

That’s why i don’t use it. I only want enter key presses not just when you click off. That’s why I said I never remember the function for only enter press

It’s not a separate event. You press enter and there’s an argument to FocusLost.

1 Like

Ah, your correct. Well, as you can see. I still always forget, I new it was a function with an argument that tells you if enter was pressed, but i didn’t think it was focus lost.

Yeah, I get confused on the Roblox API too.