Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

So im trying to make an IP Lookup Tool. And its looking up my IP. Help?

local https = game:GetService("HttpService")

script.Parent.Clicker.MouseClick:Connect(function()
	local ip = script.Parent.IPVAL.Value
	if ip == "" then
else
		local Ip = script.Parent.IPVAL.Value
		local link = "http://ip-api.com/line/#"..Ip -- sets a variable for the link
		local IP = tostring(https:GetAsync(link), true) -- changes the text to the output of the link
		script.Parent.Parent.Parent.IP.InformationBox.SurfaceGui.TextLabel.Text = IP
	end
end)

You cant get info like their address since its just an IP and it only shows their city and state and stuff like that.

But here's what is wrong, So i made a string value called IPVAL and i changed the value to 1.1.1.1 but when i click search it doesnt even search up the ip 1.1.1.1. It does my ip. Is there a fix to this?

5 comments

0

Why are you even trying to make one?

0

cause im making a game called "Internet Protocol Lookup Tool"

0

Wouldn't this be illegal to take people's IP's..?

0

its not taking ip's?

0

Why the hell are you looking up peoples IP anyways? Kinda sus.

1 answer

✓ Accepted answer

the link should be "http://ip-api.com/line/"..Ip instead of "http://ip-api.com/line/#"..Ip

you can check that you're making the right request by visiting the link in your browser

local https = game:GetService("HttpService")
local link = "http://ip-api.com/line/1.1.1.1"
local IP = tostring(https:GetAsync(link), true) 
print(IP)

This discussion is preserved as it was. New answers, comments, and votes are closed.