of     1   

#228417258Monday, December 04, 2017 4:54 AM GMT

How can one check the connectivity of the player? Like Mad Paintball 2 and etc. It checks to see if you're fast enough to play and not lag out. How would I be able to do that and then if they are not fast enough, then kick them?
#228417279Monday, December 04, 2017 4:55 AM GMT

with a remote function and tick
#228417298Monday, December 04, 2017 4:55 AM GMT

Can I see how this is done?
#228417412Monday, December 04, 2017 5:00 AM GMT

If there's an official way, I don't know about it. Maybe you could leverage the Stats service somehow: http://wiki.roblox.com/index.php?title=API:Class/Stats Alternatively you could ping them with a RemoteFunction and print how long it takes to come back Put the RemoteFunciton in the ReplicatedStorage and call it PingTest, then when they join, run it a few times and average it. local rep = game:GetService("ReplicatedStorage") game.Players.PlayerAdded:connect(function(player) local checks = 20 local total = 0 for i = 1,checks do local start = tick() result = rep.Events.PingTest:InvokeClient(player) local stop = tick() total = total + (stop-start) wait() end total = total/checks -- this will be your ping in seconds. end)
#228424328Monday, December 04, 2017 1:05 PM GMT

Is there anything I need on the event side? cause I'm gonna put this client side.
#228424529Monday, December 04, 2017 1:16 PM GMT

I can't seem to get that script to work either.
#228424784Monday, December 04, 2017 1:30 PM GMT

#228424821Monday, December 04, 2017 1:32 PM GMT

#228424932Monday, December 04, 2017 1:38 PM GMT

This goes server side. You are invoking the client. Put a Folder in the ReplicatedStorage named Events, and put your RemoteFunction named PingTest in that. On the client, you will say local rep = game:GetService("ReplicatedStorage") function rep.Events.PingTest.OnClientInvoke() return end
#228424977Monday, December 04, 2017 1:40 PM GMT

Ok so I got it to work. Now how do I tell if it's a bad connection?
#228425007Monday, December 04, 2017 1:43 PM GMT

total = total/checks -- this will be your ping in seconds. This is in seconds. So, now you tell me, how is Ping measured?
#228425036Monday, December 04, 2017 1:45 PM GMT

Welp. My average is about 0.000andthenabunchofnumbers. So I'm gonna assume that a bad ping would be like 3-5 seconds?
#228426268Monday, December 04, 2017 3:01 PM GMT

I would make it a high-ish number, because I got pretty angry when I couldn't play Mad Paintball 2 because my WiFi sucked at the time.
#228426382Monday, December 04, 2017 3:06 PM GMT

Make sure you're not testing the latency in studio, the server and client are one and therefore will have inaccurately low results

    of     1