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 » Scripting Helpers
Home Search
 

Re: Weld not working

Previous Thread :: Next Thread 
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
20 Jul 2011 06:30 PM
I have a brick I want to weld to another brick. It worked the first time, but now it won't. Here's the script:

enabled = true
function Touch(part)
print("touched!")
if not enabled then return end
enabled = false
print(enabled)
w = Instance.new("Weld")
w.Parent = game.Workspace
print("Parent")
w.Part0 = script.Parent
w.Part1 = part
print("Worked!")
end
script.Parent.Touched:connect(Touch)

It doesn't print anything.
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
20 Jul 2011 06:42 PM
Help!!
Report Abuse
duncan999007 is not online. duncan999007
Joined: 20 Mar 2010
Total Posts: 123
20 Jul 2011 06:44 PM
here

enabled = true
function Touch(part)
print("touched!")
if enabled == true then
enabled = false
print("enabled")
w = Instance.new("Weld")
w.Parent = game.Workspace
print("Parent")
w.Part0 = script.Parent
w.Part1 = part
print("Worked!")
end
end
script.Parent.Touched:connect(Touch)
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
20 Jul 2011 06:47 PM
No, my way of making debounce came straight from da wiki.
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
20 Jul 2011 06:49 PM
Not that it really matters, but fix your print, there aren't any quotations.
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
20 Jul 2011 06:50 PM
It should be print("enabled")
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
20 Jul 2011 06:50 PM
the print(enabled) is supposed to return false in the output.
Report Abuse
Kevaknight is not online. Kevaknight
Joined: 08 Jun 2009
Total Posts: 2278
20 Jul 2011 06:51 PM
May I see the output?
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
20 Jul 2011 06:54 PM
There is none. Sorry. :(
Report Abuse
duncan999007 is not online. duncan999007
Joined: 20 Mar 2010
Total Posts: 123
20 Jul 2011 06:57 PM
...in yours it returns the script before it prints it >.> if you want it to pring false, you have to put it before it returns
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
20 Jul 2011 06:59 PM
Erm... How much do you script? It only returns end if it's false...
Report Abuse
duncan999007 is not online. duncan999007
Joined: 20 Mar 2010
Total Posts: 123
20 Jul 2011 07:02 PM
oops lol, im getting confused, im working on 3 scripts at once...
Report Abuse
duncan999007 is not online. duncan999007
Joined: 20 Mar 2010
Total Posts: 123
20 Jul 2011 07:10 PM
FIXED
use my script, and remove the quotation marks from enabled :P
and u need to put a wait(blahblah) enabled = true in there too
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
20 Jul 2011 07:25 PM
It's being dropped from a hight. Would that caused Touched not to fire? Cause that didn't work!!!!1!! D:
Report Abuse
duncan999007 is not online. duncan999007
Joined: 20 Mar 2010
Total Posts: 123
20 Jul 2011 07:34 PM
well if your in edit mode, no. connect lines dont work in edit mode
Report Abuse
ZizZazZuz is not online. ZizZazZuz
Joined: 16 Jun 2008
Total Posts: 2743
20 Jul 2011 07:42 PM
What? Since when?
Report Abuse
hyper900 is not online. hyper900
Joined: 14 May 2009
Total Posts: 873
20 Jul 2011 07:49 PM
A weld's Part0 has to be it's parent I thought :S

I never knew you could weld workspace.....
Report Abuse
duncan999007 is not online. duncan999007
Joined: 20 Mar 2010
Total Posts: 123
20 Jul 2011 07:50 PM
he didnt weld workspace... the script is in a brick
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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