Tools moving models? [CLOSED] [closed]
Asked by
8 years ago Edited 8 years ago
I am making a tool that clones a model in Lighting. I want to move the clone to Workspace and then to a specific block. I have this, can I have help:
01 | local tool = script.Parent |
02 | local clickEvent = tool.ClickEvent |
03 | local spawnblock = game.Workspace.spawnblock |
04 | local clickEventConnection |
06 | local function createPart(location) |
07 | local car = game.Lighting.Assets.Car |
09 | car.CFrame = spawnblock.CFrame |
12 | local function onClick(player, clickLocation) |
13 | createPart(clickLocation) |
16 | local function onEquip() |
17 | clickEventConnection = clickEvent.OnServerEvent:connect(onClick) |
21 | tool.Equipped:connect(onEquip) |