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

How do i use module scripts(Aka.Require scripts)?

Asked by 3 years ago
Edited 3 years ago

I've asked over and over again but still no answer, so i decided to make an entirely new script and made it a module. (Ofc some are not made by me since i'm trash at modeling. Basically it's a stand script, here it is. require(4902600443)("Stand Name", "DONTGIMMEUSELESS"). I know how to use it in roblox, which you just put this in the console and execute it, but the problem is i have to do it manually and when somebody else joins my server, i have to do it manually which is annoying, plus when I'm not in the server they won't be able to use it.

require(4902600443)("TWOH", "DONTGIMMEUSELESS")---The username.

How do i use THE require script? My plan is to make it that it auto launches when i join the game(not for everybody, only me and my friends.)

require(4902600443)("Stand Name, "IcyMicro")

require(4902600443)("Stand Name", "DONTGIMMEUSELESS")

require(4902600443)("Star Platinum", "XxMast3rG4m3rxX")

require(4902600443)("King Crimson", "justinfortnite125")

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Make a server script and put it in ServerScriptService.

local friends = { --make a table of your friends' ids
    440201844,
    1845082812,
    1101725997,
    1799468153
}

local stands = { --make a table of the stands corresponding to the id in the above table
    "WS",
    "TW",
    "SP",
    "KC"
}

game:GetService("Players").PlayerAdded:Connect(function(player) --detect when a player joins the server
    for key,friend in pairs(friends) do --go through the friends table
        if player.UserId == friend then --if the player is your friend then
            require(4902600443)(stands[key],player.Name) 
        end
    end
end)
0
Can i add you in discord? Jeemuzu#5991 DONTGIMMEUSELESS 1 — 3y
Ad

Answer this question