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: Can someone help edit these scripts (2 of them)

Previous Thread :: Next Thread 
adabm is not online. adabm
Joined: 23 Oct 2008
Total Posts: 73
05 May 2012 06:56 PM
Is there any way to make this script so any/every unlocked brick that passes through the brick with this script in it will be named the name I choose? (Script Below)

--------------------------------------------------------------------

function onTouched(hit)
if hit.Name == "AnyUnlockedBrick" then
hit.Name = "RenamedBrick"
end
end

script.Parent.Touched:connect(onTouched)

----------------------------------------------------------------------

Also, is there any way make this brick teleporter script so that when only bricks named "Random" will pass through. And could it be done so I can easily change the name later? (Script Below)

----------------------------------------------------------------------

function onTouched(part)


part.CFrame = CFrame.new(script.Parent.Parent.Exit.Position.x, script.Parent.Parent.Exit.Position.y, script.Parent.Parent.Exit.Position.z)
end


script.Parent.Touched:connect(onTouched)

-----------------------------------------------------------------

If you are able to edit these, please message me and post.
Report Abuse
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 07:03 PM
I'll make the first one.
Someone else work on the other.

~!~ Plus One Post ~!~
Report Abuse
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 07:07 PM
function onTouched(part)
if part.Locked == false then
part.Name = "Name"
else
end
end


script.Parent.Touched:connect(onTouched)



Any unlocked brick that touches it gets re-named "Name" (Without the quotes)

~!~ Plus One Post ~!~
Report Abuse
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 07:42 PM
Other


function onTouched(part)
if part.Name == "Random" then
part.CFrame = CFrame.new(script.Parent.Parent.Exit.Position.x, script.Parent.Parent.Exit.Position.y, script.Parent.Parent.Exit.Position.z)
else
end
end


script.Parent.Touched:connect(onTouched)





Tested and works

~!~ Plus One Post ~!~
Report Abuse
wwemaniac99 is not online. wwemaniac99
Joined: 10 Mar 2010
Total Posts: 41496
05 May 2012 07:46 PM
"AnyUnlockedBrick" doesn't check the brick to see if it's unlocked. TheLuaNoob's script should work.
Report Abuse
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 07:47 PM
It works :P

I dont post them without testing them

~!~ Plus One Post ~!~
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