generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Can someone fix this script?

Previous Thread :: Next Thread 
Alphaminusone is not online. Alphaminusone
Joined: 19 Jun 2016
Total Posts: 419
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
Alphaminusone is not online. Alphaminusone
Joined: 19 Jun 2016
Total Posts: 419
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
CasuallyCritical is not online. CasuallyCritical
Joined: 09 Feb 2016
Total Posts: 128
16 Mar 2017 03:13 PM
Is it a local script?
Report Abuse
Alphaminusone is not online. Alphaminusone
Joined: 19 Jun 2016
Total Posts: 419
16 Mar 2017 03:25 PM
No.
Report Abuse
Alphaminusone is not online. Alphaminusone
Joined: 19 Jun 2016
Total Posts: 419
16 Mar 2017 03:28 PM
Oh. It worked when I made it local thanks!
Report Abuse
CasuallyCritical is not online. CasuallyCritical
Joined: 09 Feb 2016
Total Posts: 128
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image