Inspired by the Airstrike gear,
I want to use a tool to clone a Model from ex. Lighting onto the position that got clicked (in workspace of course).
Well, I cant figure out how to do it.
I tried searching the forum, youtube tutorials, nothing.
All that came up was using a script to clone a part into workspace, without a tool, onto a set position.
Even tried to rewrite the original Airstrike radio scripts.
I’ve not tested this but you should use a remote event to send the mouse position and wanted model to the server and clone the model on the server. I would set a part in the model to be the PrimaryPart, then use SetPrimaryPartCFrame to move the model.
--//Local Script\\--
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local RemoteEvent = ReplicatedStorage:WaitForChild('RemoteEvent ')
local player = game:GetService('Players').LocalPlayer
local Mouse = player:GetMouse()
Tool.Activated:Connect(function()
local MousePos = Mouse.Hit.Position
RemoteEvent:FireServer(MousePos)
end)
--//Server Script\\--
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local RemoteEvent = ReplicatedStorage:FindFirstChild('RemoteEvent ')
RemoteEvent.OnServerEvent:Connect(function(player, MousePos, Model)
local ModelClone = Models:FindFirstChild(Model):Clone()
ModelClone:SetPrimaryPartCFrame(CFrame.new(MousePos))
end)
If the model is spawning in the ground you could either change the PrimaryPart position or mess around with the MousePos.Y. Ex.
local PosX = MousePos.X
local PosY = MousePos.Y --//You could add a number like 5 and it would spawn higher or -5 and it would spawn lower.
local PosZ = MousePos.Z
ModelClone:SetPrimaryPartCFrame(CFrame.new(PosX, PosY, PosZ))
Yes, the PrimaryPart is set and the only welds in the model are between parts that make up the plane, the full structure and the glass, and a Motor6D in the HumanoidRootPart connecting to the structure itself.
Tried to remove that, without any luck.
If you’re okay with it, I can create an empty baseplate with nothing but the plane, adding you to TeamCreate.