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

How would I convert this script to work with filtering enabled?

Since ROBLOX added the new rule I would like to know how I could convert this script so that it is filtering enabled compatible.

local s = game.ServerStorage.C
local size = false
local coffee = false
local ready = false
local inwork = false
local toolcheck = false
local coffeo = {"Regular","Expresso","Macchiato","Latte"}
local sizeo = {"Medium","Small","Large"}
local extras = {"Chocolate","Vanilla","Caramel"}
local buildtext1 = ""
local player = game.Players:GetPlayers()
local correct = ""

function verify()
    if inwork == true then
        print("in workspace")
    elseif inwork == false then
        prepare()
    end
end

function prepare()
    local size1 = sizeo[math.random(#sizeo)]
    local extras1 = extras[math.random(#extras)]
    local coffee1 = coffeo[math.random(#coffeo)]
    local buildtext = "I would like a "
    correct = size1.." "..extras1..""..coffee1
    buildtext = buildtext..size1.." "..extras1.." "..coffee1
    buildtext1 = buildtext
    ready = true
    print(buildtext)
    textbuilder()
end

function textbuilder()
    s.Head.sc.SurfaceGui.TextLabel.Text = buildtext1
    ready = true
    s:clone().Parent = game.Workspace
    inwork = true
end

game.Workspace.checker.censor.Touched:connect(function(h)
    if (h.Parent.Name == correct) then
    game.Workspace.C.Head.sc.SurfaceGui.TextLabel.Text = "Thank you!"
    wait(5)
    inwork = false
    ready = false
    game.Workspace.c:destroy()
    elseif (h.Parent.Name ~= correct and h.Parent.ClassName == "Tool") then
        game.Workspace.C.Head.sc.SurfaceGui.TextLabel.Text = "I didn't order this!"
        wait(5)
        ready = false
        inwork = false
        game.Workspace.C:destroy()
end
end)

game.Workspace.aaaa.ClickDetector.mouseClick:connect(verify)

2 comments

1

A click detector works with FE and as far as i can see there is nothing that needs to be changed since this can all run on the server side.

0

Please look on the wiki first on how to make things FE compatible, and learn how it works to know what you need to change to make it compatible.

1 answer

✓ Accepted answer

There is no reason why it should be a local script or not FE compatible. Just make it a server script and it will work with FE without making any changes.

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