Log in to vote

(cant be solved) I dont understand this error "attempted to call require with invalid arguements"?

Asked by
Nozazxe 83
3 days ago
Edited 2 days ago

Hi, so im making a model inserter for my admin game. For some reason, this script fails to insert the model. Why? insert script in serverscriptservice

    local item = require(id)
    item.Parent = game.Workspace

textbutton local script

local id = script.Parent.Parent.InsertText.ChangeScript.Change.ChangeRemoteHandler.Text.Value

Update: I see that insertservice was reccomended, but i want a way to insert stuff made by anyone. is there a way how?

the require keyword is used to add module scripts into your code, i think you want to use the InsertService instead, you can see here enzotinman1 22 — 3d
It says that it only inserts stuff made by me or roblox. is there a way i can insert stuff made by other people? Nozazxe 83 — 3d
as its a security thing i doubt there would be a way to insert any model from the id like you want, its probably for the best tho if people could spawn any model in your game it could contain malicious scripts enzotinman1 22 — 3d
im the only one who gets to have it, but since theres no way ill think of something else Nozazxe 83 — 2d

Answer this question