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

How do you insert a model into the game from the lighting?

(I'm horrible at scripting) I'm working in a part of my game where cars are moving and I want them to be copyed and inserted into the game from the lighting. I've tried doing this by myself many times and looked on youtube but there were no tutorials. All I need is a simple tutorial on how to do this.

3 answers

✓ Accepted answer

You would use one of the following functions:

MoveTo() TranslateBy() SetPrimaryPartCFrame()

SrtPrimaryPartCFrame requires you to set a primary part before you move the model.

Set the Parent of the model to workspace.

Finally, you should be using ServerStorage to store things not Lighting.

1 comment

0

That would not move it from lighting thats to move it from one point in workspace to another

Yah, when you use the script

Clone() Means you clone something like if you click something

short example:

local Click = Button.MouseButton1Click:connect(onClick)
local Button = game.Workspace.Model1.Button

while true do
function onClick(Button)
game.ServerStorage.Model1:MoveTo(StarterPack)
end

sorry hard to not script without testing on roblox, but I have a game and all of the tools don't work in Lighting. I use Lighting for placing GUI's sometimes or a model that falls from the sky. Server Storage is a storage for the server so it is a good place to store

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