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 |
|
|
|
| 05 May 2012 07:03 PM |
I'll make the first one. Someone else work on the other.
~!~ Plus One Post ~!~ |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 05 May 2012 07:47 PM |
It works :P
I dont post them without testing them
~!~ Plus One Post ~!~ |
|
|
| Report Abuse |
|
|