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

How do I make this script filtering enabled?? Steps plz?

Asked by 6 years ago

Hi, im a new scripter and I would appreciate you helping me make this script filtering enabled step by step, so i can disect it and learn. I have a car spawning GUI which lets you choose which car you want to spawn and select it. If you have over 10,000 money then it spawns the car clicked on to a location.

The Gui is working fine, and when I click the buy button it works (says error if i dont have 10,000), however the car doesnt spawn to the location from the workspace

Car spawning script:

local P = script.Parent
local player = P.Parent.Parent
local index = 1

local vehicles = {
--  {NAME                       , THUMBNAIL ID}
    {"Toyota Corolla 2010"  , 0}, --LEAVE ALL THUMBNAIL ID AS 0. THERE IS NO POINT FOR A PICTURE.
    {"Smart Fortwo" , 0},
    {"Sudiko Green Yoga"    , 0},
    {"Sudiko Blue Yoga" , 0},
    {"Toyota Prius 2010"    , 0},
    {"BMW i3"   , 0},
    {"TCI"  , 0},
    {"Toyota Prius 2016"        , 0}
}

wait(0.5)
-- GUI vars
local bg = P.BG

-- Helper function
function SetInformation(index)
    bg.I.Image = "http://www.roblox.com/thumbs/asset.ashx?assetId="..vehicles[index][2].."&x=420&y=420"
    bg.T.Text = vehicles[index][1]
end

local locked = false
bg.S.MouseButton1Click:connect(function()
    local Money = player.leaderstats:FindFirstChild("Money")
    if Money.Value > 9999 then
        Money.Value = Money.Value - 10000

    if (locked) then return end
    locked = true
    local vehicleName = player.Name.."Car"
    local model = workspace:FindFirstChild(vehicleName)
    if (model) then model:Destroy() end
    model = game.ServerStorage.Vehicles:FindFirstChild(vehicles[index][1]):Clone()
    model.Name = vehicleName
    model.Parent = game.Workspace
    model:MakeJoints()
    model:MoveTo(P.Regen.Value.Position)
    P:Destroy()
    locked = false  

    else
        script.Parent.BG.S.Text = "Not Enough Money, 10,000 Needed!"
        wait(3)
        script.Parent.BG.S.Text = "Select"
    end
end)

bg.B.MouseButton1Click:connect(function()
    index = index - 1
    if (index < 1) then index = #vehicles end
    SetInformation(index)
end)

bg.N.MouseButton1Click:connect(function()
    index = index + 1
    if (index > #vehicles) then index = 1 end
    SetInformation(index)
end)

bg.Q.MouseButton1Click:connect(function()
    P:Destroy()
end)

SetInformation(index)

This is a script in the serverstorage and the "vehicles" folder is in the server storage too

thanks for helping!!

1 answer

Log in to vote
0
Answered by 6 years ago

You don't make the script filtering enabled, you make the whole game filtering enabled. It's really easy. Just click Workspace in ROBLOX Studio, and scroll down until you find, 'Filtering Enabled'. Once you find that, you can simply tick it and boom, save/publish the game and it'll ALL be filtering enabled, but that does not mean exploiters can not exploit items in Lighting or RemoteService, but everything in Workspace will be Filtering Enabled, so you can literally just add the car in Workspace and it'll basically be filtering enabled.

Hope this helped :D

0
Also, you've got to change the position where the car goes ~ CrimsonFlux CrimsonFlux 6 — 6y
0
My game is already in filtering enabled. Because of filtering enabled the script does not work. I need to make the script filtering enabled compatible. BADABOO2016 3 — 6y
Ad

Answer this question