LocalScript:
script.Parent.TextButton.MouseButton1Click:Connect(function()
text = script.Parent.TextBox.ContentText
LocalPlayer = game.Players.LocalPlayer
game:GetService("ReplicatedStorage").MessageSent:FireServer(LocalPlayer, text)
end)
Server Script:
game.ReplicatedStorage.MessageSent.OnServerEvent:Connect(function(LocalPlayer, text)
print(text)
end)
the “print(text)” just prints my username after running the script. Any idea why?