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

how to make a model spawner tool? [closed]

Asked by 6 years ago
Edited 6 years ago

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)

Closed as Not Constructive by RubenKan

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?