Text label not working properly

Hi, So I was trying to change a value based on a text input given by the user but its not working properly. Instead of showing text, its showing the actions I take. What can I do?

client Script:

script.Parent.Changed:Connect(function(plr)
	local currenttext = script.Parent.Text
	game.ReplicatedStorage.ChangeText:FireServer(plr,currenttext)
end)

ServerScript:

game.ReplicatedStorage.ChangeText.OnServerEvent:Connect(function(plr,CurrentText)
	print("Text Changed")
	print(CurrentText)
	if script.Parent.Parent.Parent.Name == plr.Name .."'s Table" then
		script.Parent.Parent.Parent.TextSign.TextPart.SurfaceGui.TextLabel.Text = CurrentText
	end
end)

What is that? Is that a StringValue or something like that?

1 Like

Its a textbox. Thats why I did script.Parent.Text

1 Like

I see now, you only need to fire remote with 1 argument instead of 2, and In server, the first argument is Player that firing it, so here’s the fixed one (client script)

Sorry If you confused

script.Parent.Changed:Connect(function()
	local currenttext = script.Parent
	game.ReplicatedStorage.ChangeText:FireServer(currenttext.Text)
end)

Thank you! Didn’t notice that. now it works

1 Like