DKKiller7
|
  |
| Joined: 11 Dec 2010 |
| Total Posts: 34 |
|
|
| 16 Jul 2011 08:31 PM |
I was doing the script tutorials on roblox wiki and when i did the elevator 1 it didn't work and in output said nothing was wrong.
|
|
|
| Report Abuse |
|
|
DKKiller7
|
  |
| Joined: 11 Dec 2010 |
| Total Posts: 34 |
|
|
| 16 Jul 2011 08:43 PM |
Debounce = false
local b = script.Parent -- Button to ground floor local p1 = script.Parent.Parent.Part1 -- the plate upon which you stand local pos1 = script.Parent.Parent.pos1 -- position of ground floor local pos2 = script.Parent.Parent.pos2 -- position of 2nd floor
function onTouched(hit) if (hit.Parent:FindFirstChild("Humanoid") ~= nil) then -- if it's a human if (Debounce == false) then Debounce = true b.BrickColor = BrickColor.new(24) -- change color to yellow p1.BodyPosition.position = pos1.Position -- go to ground floor p1.Anchored = false wait(5) b.BrickColor = BrickColor.new(1) -- change color to white Debounce = false end end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 16 Jul 2011 08:45 PM |
| Won't that only take it to the ground floor? |
|
|
| Report Abuse |
|
|
DKKiller7
|
  |
| Joined: 11 Dec 2010 |
| Total Posts: 34 |
|
| |
|