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

How would I make a httpservice command?

Asked by 9 years ago
--I've tried but this won't work.
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg:sub(1,2) == "h/" then -My chatted command game:GetService("HttpService"):GetAsync(msg:sub(3))-Gets any raw link when saying h/.
end
end)
end)
--What I want it to do is that whenever I type "h/" it sends the link back using the function getasync. And that means any link. That has roblox lua code in it.
0
What error are you getting from trying to run this? adark 5487 — 9y
0
I'm not so much concerned about the error as the intent, as the return from the GetAsync is being used. Please give your question some context and explanation, to help us help you. User#6546 35 — 9y
0
Also there are no errors. It just doesnt work I have Httpenabled and everything and all I want it to do is return a raw link full of code when h/ is executed. And I mean any raw link. NotNowSkid 10 — 9y
0
@adark @eLunate NotNowSkid 10 — 9y

Answer this question