TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
|
| 15 Jan 2015 02:33 PM |
Nothing in output, no errors, does nothing.
function ontouched(hit) if hit.name == ("Handle") then local l = hit.FindFirstChild("Level") if l.Value == 5 and script.Parent.Parent.inuse.Value == false then script.Parent.Parent.inuse.Value = true for i = 31.9,28,-0.1 do script.Parent.Parent.door.Position = -28.5, 2.5,(i) wait(0.1) end wait(5) for i = 28.1,32,0.1 do script.Parent.Parent.door.Position = -28.5, 2.5,(i) wait(0.1) end script.Parent.Parent.inuse.Value = false end end end |
|
|
| Report Abuse |
|
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 15 Jan 2015 03:00 PM |
hit.FindFirstChild("Level")
should not use a dot
hit:FindFirstChild("Level") |
|
|
| Report Abuse |
|
|
KLGA
|
  |
| Joined: 19 Apr 2014 |
| Total Posts: 2571 |
|
|
| 15 Jan 2015 03:03 PM |
also
script.Parent.Parent.door.Position = -28.5, 2.5,(i)
try this instead
part.CFrame = part.CFrame + Vector3.new(0,0,0) |
|
|
| Report Abuse |
|
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
|
| 15 Jan 2015 08:47 PM |
| KLGA, he was just fine using a dot, but he forgot the "self" argument. |
|
|
| Report Abuse |
|
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
|
| 16 Jan 2015 01:37 PM |
Floating point errors in your numeric for loops. Fix them.
http://wiki.roblox.com/index.php/Lua_errors#Tricky_Mistakes |
|
|
| Report Abuse |
|
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
|
| 17 Jan 2015 09:59 AM |
i have this now
part = script.Parent function onTouched(hit) if hit.name == ("Handle") then local l = hit.FindFirstChild("Level") if l.Value == 5 and script.Parent.Parent.inuse.Value == false then script.Parent.Parent.inuse.Value = true for i = 31.9,28,-0.1 do script.Parent.Parent.door.Position = -28.5, 2.5,(i) wait(0.1) end wait(5) for i = 28.1,32,0.1 do script.Parent.Parent.door.Position = -28.5, 2.5,(i) wait(0.1) end script.Parent.Parent.inuse.Value = false end end end part.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
|
| 17 Jan 2015 02:27 PM |
| Use Vector3s, as someone suggested. |
|
|
| Report Abuse |
|
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
|
| 17 Jan 2015 02:28 PM |
i have this
part = script.Parent function onTouched(hit) if hit.name == ("Handle") then local l = hit.FindFirstChild("Level") if l.Value == 5 and script.Parent.Parent.inuse.Value == false then script.Parent.Parent.inuse.Value = true for i = 31.9,28,-0.1 do script.Parent.Parent.door.Position = Vector3.new(-28.5, 2.5,i) wait(0.1) end wait(5) for i = 28.1,32,0.1 do script.Parent.Parent.door.Position = Vector3.new(-28.5, 2.5,i) wait(0.1) end script.Parent.Parent.inuse.Value = false end end end part.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|
TheMesgi
|
  |
| Joined: 03 Mar 2012 |
| Total Posts: 360 |
|
| |
|