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: Falling Script

Previous Thread :: Next Thread 
MasterROBOGuy1234 is not online. MasterROBOGuy1234
Joined: 20 Dec 2010
Total Posts: 791
18 Jan 2013 11:15 PM
A script to where, you walk on the block and it falls.. but also it regenerates to where it will be right back up and the place it was originally at... Please help, I would like to have it soon.
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
18 Jan 2013 11:31 PM
Idk how to make regen part.

--PUT THIS IN AN ANCHORED BRICK

nob = script.Parent

nob.Touched:connect(function(hit)
a = hit.Parent:findFirstChild("Humanoid")
if a then
nob.Anchored = false
end
end)
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
18 Jan 2013 11:34 PM
Regen is easy

nob = script.Parent
nob2 = nob:Clone()

nob.Touched:connect(function(hit)
a = hit.Parent:findFirstChild("Humanoid")
if a then
nob.Anchored = false
wait(1)
nob2:Clone().Parent = Workspace
end
end)
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Jan 2013 11:36 PM
Probably something like this:

    local Touched = false
    
    script.Parent.Touched:connect(function ( Hit )
     if not Hit.Parent:FindFirstChild( "Humanoid" ) ot Touched then
     Touched = false
     local CloneBlock = script.Parent:Clone( )
     script.Parent.Anchored = false
     Wait(5)
     CloneBlock.Parent = script.Parent.Parent
     script.Parent:Destroy( )
    end)


¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Jan 2013 11:37 PM


    local Touched = false
    
    script.Parent.Touched:connect(function ( Hit )
     if ( not Hit.Parent:FindFirstChild( "Humanoid" ) ) or ( Touched ) then
     Touched = false
     local CloneBlock = script.Parent:Clone( )
     script.Parent.Anchored = false
     Wait( 5 )
     CloneBlock.Parent = script.Parent.Parent
     script.Parent:Destroy( )
    end)

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
18 Jan 2013 11:38 PM
>Wait(5)
Nop
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Jan 2013 11:40 PM
What's wrong with "Wait( 5 )"?

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
18 Jan 2013 11:40 PM
>W
wait(5)
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Jan 2013 11:49 PM
I still don't understand.

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
18 Jan 2013 11:50 PM
In RBX.Lua Wait(5) won't work but wait(5) will.

~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Jan 2013 11:52 PM
That is incorrect.

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
UnAdmin is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
18 Jan 2013 11:55 PM
I just tested that in Studio. I learned something new.

~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~
Report Abuse
MasterROBOGuy1234 is not online. MasterROBOGuy1234
Joined: 20 Dec 2010
Total Posts: 791
19 Jan 2013 09:56 AM
I just tried his, it did not work anyways... I'm gonna try the (lower case) wait(5) but I'm gonna make it (1).
Report Abuse
MasterROBOGuy1234 is not online. MasterROBOGuy1234
Joined: 20 Dec 2010
Total Posts: 791
19 Jan 2013 09:58 AM
That did not work anyways. Thanks for trying.
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
19 Jan 2013 10:11 AM
script.Parent.Touched:connect(function(hit)
a = hit.Parent:findFirstChild("Humanoid")
if a then
for i = 1, 5, -.2 do
script.Parent.Transparency = i
script.Parent.Anchored = false
wait(4)
lal = script.Parent:clone()
lal.Parent = workspace
lal.Anchored = true
end
end
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
19 Jan 2013 07:55 PM
I meant to use return:

    local Touched = false
    
    script.Parent.Touched:connect(function ( Hit )
     if ( not Hit.Parent:FindFirstChild( "Humanoid" ) ) or ( Touched ) then return end
     Touched = false
     local CloneBlock = script.Parent:Clone( )
     script.Parent.Anchored = false
     Wait( 5 )
     CloneBlock.Parent = script.Parent.Parent
     script.Parent:Destroy( )
    end)

¤ ¤ † K M <( •д• )> X D † ¤ ¤
Report Abuse
Undefined98 is not online. Undefined98
Joined: 17 Dec 2009
Total Posts: 2597
19 Jan 2013 08:00 PM
-notesave-
Report Abuse
MasterROBOGuy1234 is not online. MasterROBOGuy1234
Joined: 20 Dec 2010
Total Posts: 791
19 Jan 2013 09:47 PM
Hmm.. I found it more simple to do it the way I did it. It's small and easy. Would you like me to show it to you?
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