attempt to call field 'OnServerEvent' (a userdata value) Hi, I has two scripts, One Server Script, Other Local Script, they contact by remote event. The error is in the server script
Local Script :
local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.msg:FireServer(script.Parent.Parent.TextBox.Text, game.Players.LocalPlayer.Name) end) script.Parent.Parent.TextBox.FocusLost:Connect(function(enterPressed) game.ReplicatedStorage.msg:FireServer(script.Parent.Parent.TextBox.Text, game.Players.LocalPlayer.Name) end)
Server Script :
function f1(text,player) game.Players:FindFirstChild(player).Character.Head.Msg.Image.Texter.Text = text end game.ReplicatedStorage.msg.OnServerEvent(f1)
function f1(text,player) game.Players:FindFirstChild(player).Character.Head.Msg.Image.Texter.Text = text end game.ReplicatedStorage.msg.OnServerEvent:Connect(f1)