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

Can roblox be connected to outside sources?

Can I somehow interact with a Roblox game using an outside source. I know you can send stuff to discord through webhooks, but is there a way I could send something back? For example would it be possible to make a website that would be able to change something in the game? Such as changing the color of an object. I know its a weird question but I'm just curious.

1 answer

✓ Accepted answer

mhm it can. I made a simple implementation, it works the way that I have a text file on my server (think of server as a computer that's 24/7 online and you can save files there and then download them from anywhere, these files can be websites too). This text file's contents can be changed using a website, then I have a Roblox script which every 0.5 seconds sets color of baseplate to the color written in the text file.

This is the website where you can change the color: http://kirda.wtf/1blaisinraisin08/change.php

This is the Roblox place: https://www.roblox.com/games/10021943758/Powerful-Baseplate

This is the Roblox script:

local HttpService = game:GetService("HttpService")
local Workspace = game:GetService("Workspace")

local url: string = "http://kirda.wtf/1blaisinraisin08/color.txt"

while task.wait(0.5) do
    -- ignore the pcall thing it is lazy way to prevent the script from stopping in
    -- case any error happens
    pcall(function()
        Workspace.Baseplate.Color = Color3.fromHex( HttpService:GetAsync(url) )
    end)
end

Color3.fromHex converts hex color into color compatible with Roblox color system. Websites stick to hex color.

The website was made using few lines of PHP code.

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