Hello,
This is driving me nuts so I had to post. I've been trying to learn how to require scripts you make.
So far I've come up with this:
1) I've made a ModuleScript and renamed it to MainModule
2) I've added
local module = {} function module.bring() Instance.new("Part", game.Workspace) end return module
4) I hit "Allow copying" and saved it to Roblox
5) I went into a game and did
require(assetID).bring()
Now the problem I'm having is that it appears the require doesn't do anything. I've tested it with other assetIDs and it works fine, so I'm guessing it has something to do with my code
Any help is appreciated,
cheers
You don't change it's CFrame so it spawns at 0, 0, 0.
local module = {} function module.bring(position) Instance.new("Part", workspace).Position = position end return module
then do this:
local position = -- a position of your humanoidrootpart or something to make sure you see the part require(assetID).bring(position)