Try using a Remote Event and sending the data needed to the server.
Client Script:
DemoEvent:FireServer(data)
Server:
DemoEvent.OnServerEvent:Connect(function(data)
print(data) -- the server will receive the data
end)
Here is more info on how: Custom Events and Callbacks | Documentation - Roblox Creator Hub