So basically I have a script that fires a remote event with a variable in my local script. The problem is the variable in the server script (that is receiving the remote event) the variable data is the player’s name, not the variable I created in the local script.
Here’s the local script:
local GuiService = game:GetService("GuiService")
local UIService = game:GetService("UserInputService")
local rep = game.ReplicatedStorage
if GuiService:IsTenFootInterface() then
Platform = "console"
elseif UIService.TouchEnabled and not UIService.MouseEnabled then
if workspace.CurrentCamera.ViewportSize.Y > 600 then
Platform = "tablet"
else
Platform = "phone"
end
else
Platform = "pc"
end
print(Platform)
rep.PLATFORMData:FireServer(Platform)
Here’s the part of the server script that receives the remote event:
PLATFORMData.OnServerEvent:Connect(function(Platform)
print(Platform)
end)