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 » Scripters
Home Search
 

Re: A card door problem

Previous Thread :: Next Thread 
TheMesgi is not online. 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 is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
15 Jan 2015 02:58 PM
bump
Report Abuse
KLGA is not online. 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 is not online. 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 is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
15 Jan 2015 08:46 PM
still didnt work
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
15 Jan 2015 08:47 PM
KLGA, he was just fine using a dot, but he forgot the "self" argument.
Report Abuse
TheMesgi is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
16 Jan 2015 11:54 AM
self?
Report Abuse
TheMesgi is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
16 Jan 2015 01:35 PM
bump
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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 is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
16 Jan 2015 09:56 PM
where is the error then
Report Abuse
TheMesgi is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
17 Jan 2015 09:14 AM
bump
Report Abuse
TheMesgi is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
17 Jan 2015 09:28 AM
:C
Report Abuse
TheMesgi is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
17 Jan 2015 09:46 AM
hello?
Report Abuse
TheMesgi is not online. 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 is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
17 Jan 2015 02:27 PM
can you fix it please
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
17 Jan 2015 02:27 PM
Use Vector3s, as someone suggested.
Report Abuse
TheMesgi is not online. 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 is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
17 Jan 2015 02:38 PM
halp
Report Abuse
TheMesgi is not online. TheMesgi
Joined: 03 Mar 2012
Total Posts: 360
17 Jan 2015 03:21 PM
can someone help please
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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