Attempt to concatenate string with userdata error?

Hello, Im OriginalDevelops, Im currently trying to make a custom chat, when player click the send button, it will fire the server and then clone a text with Player Name and the Text that player input! But it give me an error 10:56:22.792 -Players.OriginalDevelops.PlayerGui.StarterMenu.ChatFrame.Input.SendButton.ServerClient:5: attempt to concatenate string with userdata
MY SCRIPT

script.Parent.Send.OnServerEvent:Connect(function(plr)
	
	local newText = game.ReplicatedStorage.ChatText:Clone()
	newText.Name = "ChatNumber".. #script.Parent.Parent.Parent.Holder.TextStorage:GetChildren()
	newText.Text = plr.Name.." : ".. script.Parent.Parent:GetPropertyChangedSignal("Text")
	newText.Position = UDim2.new(0, 0, newText.Position.Y.Scale + (.008 * #script.Parent.Parent.Parent.Holder.TextStorage:GetChildren()), 0)
	newText.Parent  = script.Parent.Parent.Parent.Holder.TextStorage
	script.Parent.Parent.Parent.Holder.CanvasSize = UDim2.new(0,0,script.Parent.Parent.Parent.Holder.Position.Y.Scale + (0.1), 0)
	
end)
1 Like

This line is your issue. Instance::GetPropertyChangedSignal returns an RBXScriptSignal. I am not sure what you are trying to do there.

Im trying to get player input from a text box

Then you would do script.Parent.Parent.Text

no, I tried it, It wont return any input from player, it just a blank

Try this

isn’t it blank because you are doing this from the server?, maybe you should pass in text as an argument from the remote event instead. On another note, if this is indeed from the server , (i’m not sure how you have everything set up but…) maybe it would also be a good idea to handle gui from the client.

1 Like