I have a kart racing game and I have added a number plate system, so that you can type in your own number plate for your own kart. There is an issue though, that is that the server has a different ‘Text’ than the client. The client fires the event when somethings has been written in the number plate but the server, for some reason, thinks that the text is my Players Name. I am really confused.
I have tried printing the children/parents of the ‘plate’ value and also, for some reason seem to come up with my Players Name
.
OutPut
![]()
My local script:
local Player = game.Players.LocalPlayer
local numberChange = game.ReplicatedStorage.NumberPlateChange
script.Parent.Parent.Confirm.MouseButton1Click:Connect(function()
if script.Parent.Parent.PlateBox.Text ~= Player.NumberPlate.PlateName then
local plate = script.Parent.Parent.PlateBox.Text
print(plate)
Player.NumberPlate.PlateName.Value = script.Parent.Parent.PlateBox.Text
numberChange:FireServer(Player, plate)
end
end)
My Server Script
local NumberEvent = game.ReplicatedStorage.NumberPlateChange
NumberEvent.OnServerEvent:Connect(function(Player, plate)
print(plate)
game.ServerStorage.PlayerKarts:FindFirstChild(Player.Name.."'s Kart").Model.NumberPlate.SurfaceGui.Frame.NumberPlate.Text = tostring(plate)
end)
Any help will be appreciated
.