|
| 16 Mar 2017 03:10 PM |
| The script is supposed to spawn a model at the mouse when clicked. It works great in studio, but in game doesn't work at all. There are no errors. Could someone fix it and tell me what was wrong so I know in the future? I inserted "Model" into the tool and it is supposed to spawn it. bin=script.Parent wait(0.3) Spawntest = ########################### function onButton1Down(mouse) local pos = mouse.hit.p local model = ################# model.Parent=game.Workspace ################## ################# end function onSelected(mouse) ################################## () onButton1Down(mouse) end) end ################################ |
|
|
| Report Abuse |
|
|
|
| 16 Mar 2017 03:11 PM |
bin=script.Parent wait(0.3) pinkslime = bin:findFirstChild("Model")
function onButton1Down(mouse) local pos = mouse.hit.p local model = pinkslime:clone() model.Parent=game.Workspace model:MakeJoints() model:MoveTo(pos) end
function onSelected(mouse) mouse.Button1Down:connect(function () onButton1Down(mouse) end) end
bin.Selected:connect(onSelected) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 16 Mar 2017 03:28 PM |
| Oh. It worked when I made it local thanks! |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2017 06:23 PM |
I'm assuming this is a HopperBin, not a tool.
HopperBins require Local Scripts. However with FilteringEnabled required for all games looking to be viewed for the U13 players, you might want to add some way of accessing the task on the server!
#code print("Hey now! You're a game dev, make some ROBUX, go play!") |
|
|
| Report Abuse |
|
|