I want to make it so when you click anywhere on a Tool, it Clones the model to where the Player's mouse clicks. Does anyone know how to get started on this?
Assuming your model is in the ReplicatedStorage service (which it should be), this LocalScript (which should be placed in the StarterGui or StarterPack) will put a clone of that model wherever the user clicks. Only when a part is clicked, of course.
NOTE: This also checks and will work with a part or a model.
local p = Game.Players.LocalPlayer local m = p:GetMouse(); local model = Game.ReplicatedStorage['Model Name']; m.Button1Down:connect(function() if m.Target then local x = model:Clone() if x:IsA("Model") then x.Parent = Workspace x:MoveTo(m.Hit.p) elseif x:IsA("BasePart") then x.Parent = Workspace x.Position = m.Hit.p end end end)
For getting the position where the Player's mouse clicks use mouse.Hit
. Then :Clone()
the model from ReplicatedStorage.