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

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

Asked by 7 years ago

(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

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

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.

0
That would not move it from lighting thats to move it from one point in workspace to another pluginfactory 463 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

You need to use Clone

Also, i would recommend not storing anything in lighting. As KritikalGunzz said, use ServerStorage or ReplicatedStorage Instead

Log in to vote
0
Answered by 7 years ago

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

Answer this question