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
 

halp

Previous Thread :: Next Thread 
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:41 PM
function OnTouched(hit)
local anchored = hit.Parent.Anchored == false
if anchored == nil then return end
if anchored ~= nil then
wait(.3)
hit.Anchored = true
end
end


why won't this work
Report Abuse
montanaontario2392 is not online. montanaontario2392
Joined: 24 Mar 2010
Total Posts: 545
30 May 2013 05:43 PM
Run it with output open.
output
output!
OUTPUT!
OUTPUT!!!
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 05:43 PM
local anchored = hit.Parent.Anchored == false

ummmm, no. Just... no.
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:45 PM
@magna
tell me how to fix it. if you're so smart then tell me how to fix it instead of criticizing me.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 05:45 PM
Well what are you even trying to do there?
Report Abuse
NeonBlox is not online. NeonBlox
Joined: 19 Oct 2008
Total Posts: 1462
30 May 2013 05:46 PM
Think this is what you were looking for.

db = false

script.Parent.Touched:connect(function()
if script.Parent.Anchored == true and db == false then
script.Parent.Anchored, db = false, true
else
script.Parent.Anchored = true
end
wait(.3)
db = false
end)
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:51 PM
@neon/ @magma

What I am trying to do is make it so if anything touches my baseplate that isn't anchored it becomes anchored.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 05:52 PM
function OnTouched(hit)
if(hit) then
hit.Parent.Anchored = true
end
end
Report Abuse
NeonBlox is not online. NeonBlox
Joined: 19 Oct 2008
Total Posts: 1462
30 May 2013 05:53 PM
Put my script in the baseplate, and it will do that. But if something touches it again it will anchor. If you want it just to fall when it's touched, use this.

script.Parent.Touched:connect(function()
script.Parent.Anchored = false
end)
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:54 PM
@magna didn't work yo
@neon thanks i'll try
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:54 PM
nope @neon didn't work.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 05:55 PM
You do have a connection line right?
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 05:56 PM
what i meant was if anything touched the baseplate then the part that touched it was unanchored.

like this

[_____]

{ BASEPLATE }
^ when that part touches it the part is unanchored.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 05:59 PM
put this in the baseplate

function OnTouched(hit)
if(hit) then
hit.Parent.Anchored = true
end
end

script.Parent.Touched:connect(OnTouched)
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 06:00 PM
still won't work . :/
Report Abuse
NeonBlox is not online. NeonBlox
Joined: 19 Oct 2008
Total Posts: 1462
30 May 2013 06:03 PM
Mine works...
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 06:03 PM
ohh unanchored (i really don't understand why you would want that)

function OnTouched(hit)
if(hit) then
hit.Parent.Anchored = false
end
end

script.Parent.Touched:connect(OnTouched)
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 06:12 PM
no i want the brick ANCCHOORRED WHEN IT TOUCHES IT
it wont work qqqqqqq
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 06:15 PM
function OnTouched(hit)
if(hit) then
hit.Anchored = true
end
end

script.Parent.Touched:connect(OnTouched)


thats tested and it works.
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 06:19 PM
what if the baseplate can't collide? then what?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 06:20 PM
All blocks can collide.
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 06:22 PM
.... there's a property called "CanCollide"... what if it's false?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 06:23 PM
It still works.
Report Abuse
ChrisIsAGummyBearYum is not online. ChrisIsAGummyBearYum
Joined: 24 Sep 2012
Total Posts: 17594
30 May 2013 06:24 PM
hmm... I'm not sure why this won't then. :/
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
30 May 2013 06:25 PM
If it's not working for you, your putting the script in the wrong place.
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