I have tried to modify parts from similar freemodels but they work only in studio mode and not while playing the game from roblox client.The intended funtion is to spawn a model once when clicked with the tool.Here is what i have(note that this only works in studio testing and not in roblox client in-game):
bin = script.Parent
function onButton1Down(mouse)
local model = bin.tent:clone()
model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.hit.p)
end
function onSelected(mouse) mouse.Icon = "rbxasset://textures\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end
bin.Selected:connect(onSelected)
