Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I get the user's IP? [closed]

Asked by
GShocked 150
9 years ago

Here is what I have so far:

game.ChildAdded:connect(function(child)
    if child:IsA('NetworkServer') then
        child.IncommingConnection:connect(function(IP, replicator)
            Instance.new('StringValue', game.Workspace).Name = IP
            print(IP)
        end)
    end
end)

But it returns in the output window (on 1 player server test):

19:06:01.886 - Started network server on 192.168.56.1|53640
19:06:01.886 - Started network server on 10.0.0.2|53640
19:06:01.886 - Started network server on 127.0.0.1|53640
19:06:01.897 - Workspace.BlueFire/IP Guide:61: unfinished long comment near '<eof>'
19:06:02.172 - Successfully opened file - C:/Users/PCUser/AppData/Local/Roblox/server.rbxl
19:06:03.227 - An error occurred
19:06:03.228 - Script 'Workspace.IP Recorder', Line 2
19:06:03.228 - Stack End
19:06:05.296 - New connection from 127.0.0.1|60796

19:06:05.361 - Replication: Can't create default object of type Players
Player -1 added
19:06:14.730 - Disconnect from 127.0.0.1|60796
Player -1 leaving

Closed as Not Constructive by AmericanStripes

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
6
Answered by 9 years ago

It is impossible, and for good reason.

0
Was it previously possible? Because I remember when IP bans were possible. GShocked 150 — 9y
0
Previously, yes. Now it is not. TickerOfTime 70 — 9y
0
Knowing a players IP isn't what ROBLOX would want people to be able to do. alphawolvess 1784 — 9y
0
Knowing an IP address allows things like DoS or DDoS attacks, GeoIP location tracks, and various other bad things. TickerOfTime 70 — 9y
Ad