bad argument #3 to 'Text' (string expected, got Object) ?
Local Script :
local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.msg:FireServer(script.Parent.Parent.TextBox.Text) end) script.Parent.Parent.TextBox.FocusLost:Connect(function(enterPressed) game.ReplicatedStorage.msg:FireServer(script.Parent.Parent.TextBox.Text) end)
Server Script :
wait(3) game.Lighting.Msg:Clone().Parent =script.Parent.Head function fs1(text) script.Parent.Head.Msg.Image.Texter.Text = text end game.ReplicatedStorage.msg.OnServerEvent:Connect(fs1)
The first parameter of OnServerEvent
is always the player that fired the remote. Therefore, you just need to add it to your function's arguments.
wait(3) game.Lighting.Msg:Clone().Parent =script.Parent.Head function fs1(player, text) script.Parent.Head.Msg.Image.Texter.Text = text end game.ReplicatedStorage.msg.OnServerEvent:Connect(fs1)