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: Wondering

Previous Thread :: Next Thread 
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:15 PM
I have this script here. It is inside of a tool in StarterPack. When a Player clicks a Nest Object should appear where they clicked. It does not. Can anyone help me with it? Heres the script.



bin = script.Parent

local N = true

function onButton1Down(mouse)

if N == true then

N = false

local model = game.ServerStorage.Nest.SNest:Clone()

model.Parent = game.Workspace

model:MakeJoints()

model:MoveTo(mouse.Hit)

wait(.1)

bin:Destroy()

end
end


function onSelected(mouse)

print("Hi")

mouse.Button1Down:connect(function() onButton1Down(mouse) end)

end

bin.Selected:connect(onSelected)--Any idea what i should use differently?





Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
27 Mar 2015 05:18 PM
bin = script.Parent

local N = true

function onButton1Down(mouse)

if N == true then

N = false

local model = game.ServerStorage.Nest.SNest:Clone()

model.Parent = game.Workspace

model:MakeJoints()

model:MoveTo(mouse.Hit.p)

wait(.1)

bin:Destroy()

end
end


function onSelected(mouse)

print("Hi")

mouse.Button1Down:connect(onButton1Down)

end

bin.Selected:connect(onSelected)--Any idea what i should use differently?
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:19 PM
@Legi
?
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:23 PM
B1
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
27 Mar 2015 05:26 PM
This is obviously a duplicate thread which I already reported you for spamming on when you made because you don't appreciate good advice when it was given to you, and I don't appreciate duplicate threads.

However, I'm not getting my hopes up because the mods barely come here.

--

He had the same criticism on how you connected your 'onButton1Down' function.

If you don't actually put forth an effort to make your code better, people are going to suggest the same things over and over.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:28 PM
I posted his script and tried it out, but it didnt work thats why i bumped. And look at the other post and this one. Ive made it easier to read, and added ServerStorage. And sadly no i dont know how to do a better alternative to HopperBin.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:30 PM
I Also did use his script, by adding the Button1Down, but it didnt work :(. Thats why i bumped it again.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
27 Mar 2015 05:33 PM
local hopperbin = script.Parent
local debounce = true

hopperbin.Selected:connect(function(mouse)
print("Hi")
mouse.Button1Down:connect(function()
if debounce then
debounce = false
local model = game.ServerStorage.Nest.SNest:Clone()
model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.Hit)
wait(.1)
hopperbin:Destroy()
end
end)
end)
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
27 Mar 2015 05:34 PM
THAT

is how you make a script easier to read for ACTUAL SCRIPTERS
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:37 PM
Thank you :D

But an error showed up :

18:36:54.146 - Unable to cast CoordinateFrame to Vector3
18:36:54.147 - Script 'Players.Player.Backpack.[S]Nest.Insert', Line 12
18:36:54.147 - Stack End
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
27 Mar 2015 05:39 PM
local hopperbin = script.Parent
local debounce = true

hopperbin.Selected:connect(function(mouse)
print("Hi")
mouse.Button1Down:connect(function()
if debounce then
debounce = false
local model = game.ServerStorage.Nest.SNest:Clone()
model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.Hit.p)
wait(.1)
hopperbin:Destroy()
end
end)
end)
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:43 PM
It worked in test Mode, But for some reason, It broke when i Entered the Server. No errors showed up in Output.
Report Abuse
NoiceScriptah is not online. NoiceScriptah
Joined: 17 Nov 2014
Total Posts: 116
27 Mar 2015 05:45 PM
Make it a LocalScript. Usually does the trick.


#໓นrŞt (RAP:86 - R$143 - Tx241) [British. Tea slurper. -slurps tea-]
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:48 PM
Not this time ):

Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
27 Mar 2015 05:51 PM
Is FilteringEnabled on? You can find it under properties in Workspace.
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:52 PM
Its not on, is it because its using LocalPlayer Somewhere?
Report Abuse
18lpickett is not online. 18lpickett
Joined: 15 Jul 2012
Total Posts: 3121
27 Mar 2015 05:57 PM
B
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
27 Mar 2015 06:33 PM
What exactly is line 12?

Sure, you showed us what the output is, but we don't know which line the error occurs in.
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