Text not Displaying for New Players

Hello, for a game that involves a player editing text on a sign, however when a new player joins the game, the text already set by the owner of the sign doesn’t display for them unless they edit the sign again. A solution that shows the edited text when a player joins the game would be appreciated.

Local Script that Manages the Text:

ResetSignEvent.OnClientEvent:Connect(function()
	SignText.Text = "Your Text Here"
end)

PromptEvent.OnClientEvent:Connect(function(EditPrompt, Value)
	EditPrompt.Enabled = Value
end)

EditEvent.OnClientEvent:Connect(function()
	EditFrame:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Sine", 0.5, true)
end)

Apply.MouseButton1Down:Connect(function()
	UpdateText:FireServer(Text.Text)
end)

local function HandleTextUpdate(Owner, NewText)
	if Owner and NewText then
		SignText.Text = NewText
		if Owner == Players.LocalPlayer then
			EditFrame:TweenPosition(UDim2.fromScale(0.5,-1), "Out", "Sine", 0.5, true)
			EditPrompt.Enabled = true
		end
	end
end

UpdateText.OnClientEvent:Connect(HandleTextUpdate)

Doubt its the issue but change Text.Text from “Apply” (textbutton) to txt.Text or something and see if it later works (might be irrelevant)

You can store the signs text inside ReplicateStorage as values(since they replicate from server to client), update them on the server and then instead of using remotes just loop through every sign value once setting the text. Then you just have to listen for event changes(sign added, sign removed, text changed).

1 Like

Hi, thanks for this idea, although this would require a lot of script rewriting, is there any other option that would keep most of the original structure?

Well you could fire a remote to the server when the player joins to retrieve the current text.