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

Can roblox be connected to outside sources?

Asked by 1 year ago

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

Log in to vote
0
Answered by
imKirda 4491 Moderation Voter Community Moderator
1 year ago
Edited 1 year ago

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.

Ad

Answer this question