A Roblox Community

A community of Robloxians who want to learn to script and build on Roblox Studio.
 
HomeFAQRegisterLog in
If you're a experienced coder make some tutorials! It would really help the site grow.
Make sure you read the rules(Which can be found by clicking here)
If you're a beginner at coding, try some tutorials.
We have many Moderators/Admins watching this site. Contact them with Questions.
Let us know what your favorite sport is. By clicking here to vote (Click here)
This site is becoming inactive. Lets make it active.
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Top posters
blueymaddog
 
naknak
 
Supernapalm
 
m27frogy
 
slayer9365
 
myrco919
 
branefreez
 
ninga95
 
CloneTrooper787
 
raboy117
 
Top posting users this month
Latest topics
» Send me an Email
January 8th 2016, 10:14 am by naknak

» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]
July 6th 2015, 7:38 pm by m27frogy

» New Site Possibly
July 6th 2015, 4:16 pm by m27frogy

» Ambassador!
April 15th 2015, 11:40 pm by naknak

» Boop - Tag
April 13th 2015, 9:46 pm by naknak

» Vip Class Script
April 13th 2015, 4:54 pm by naknak

» Who's active?!
April 13th 2015, 4:52 pm by naknak

» Where to go from here.
April 13th 2015, 4:51 pm by naknak

» Genesis Point
July 17th 2014, 7:04 pm by branefreez

» Reward System
July 17th 2014, 5:41 am by m27frogy

» Script Request
July 10th 2014, 11:43 am by naknak

» local scripts?
July 10th 2014, 11:39 am by naknak

» Project: Reconstruction [Died]
July 10th 2014, 11:36 am by naknak

» Hi. I am new here
April 26th 2014, 4:01 pm by altshiftkey

» What's your favorite sport?
January 1st 2014, 2:13 pm by m27frogy

» FlashLight Script
January 1st 2014, 2:11 pm by m27frogy

» Gun Making! [READ DESC]
January 1st 2014, 2:10 pm by m27frogy

» Hi, I am new here!
November 26th 2013, 3:33 pm by Keanu73

» Improve Coding
October 26th 2013, 1:12 pm by pook03

» Simple Button
September 1st 2013, 6:19 pm by branefreez


Share | 
 

 My Script error

View previous topic View next topic Go down 
AuthorMessage
Superzachary
Novice Scripter
Novice Scripter
avatar

Posts : 2
Join date : 2013-01-16

PostSubject: My Script error   January 16th 2013, 7:36 pm

Hello I belive I have a error


val = script.Parent.Parent.Open
val2 = script.Parent.Parent.Moving
DA2 = script.Parent.Parent.DoorA2
DA1 = script.Parent.Parent.DoorA1
function onC()
if val2.Value == false then
if val.Value == false then
val2.Value = true
for i = 1, (DA1.Size.X*10)-10 do
wait(0.09)
lv = D2.CFrame
DA2.CFrame = lv + ((lv*CFrame.Angles(0,-math.pi/2,0)).lookVector*0.1)
lv = DA1.CFrame
DA1.CFrame = lv + ((lv*CFrame.Angles(0,math.pi/2,0)).lookVector*0.1)
end
val2.Value = false
val.Value = true
else
val2.Value = true
for i = 1, (DA1.Size.X*10)-10 do
wait(0.01)
lv = DA2.CFrame
DA2.CFrame = lv - ((lv*CFrame.Angles(0,-math.pi/2,0)).lookVector*0.1)
lv = DA1.CFrame
DA1.CFrame = lv - ((lv*CFrame.Angles(0,math.pi/2,0)).lookVector*0.1)
end
val2.Value = false
val.Value = false
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onC)
Back to top Go down
Superzachary
Novice Scripter
Novice Scripter
avatar

Posts : 2
Join date : 2013-01-16

PostSubject: Re: My Script error   January 16th 2013, 7:38 pm

If you can Fix it please, Its a sliding door I have click detector
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 143
Join date : 2012-07-14

PostSubject: Re: My Script error   February 22nd 2013, 8:56 pm

First, make sure val and val2 are boolean values [BoolValue]
Also, I dont know if this will fix it, but I think you are erroring because you arent initiating the variables with the "local" keyword. Test this out:
It's Highly Compacted so it loads faster.
Code:
local val=script.Parent.Parent.Open local val2=script.Parent.Parent.Moving local DA2=script.Parent.Parent.DoorA2 local DA1=script.Parent.Parent.DoorA1 function onC() if val2.Value==false then if val.Value==false then val2.Value=true for i=1,(DA1.Size.X*10)-10 do delay(0.09, function() local lv=D2.CFrame DA2.CFrame=lv+((lv*CFrame.Angles(0,-math.pi/2,0)).lookVector*0.1) lv=DA1.CFrame DA1.CFrame=lv+((lv*CFrame.Angles(0,math.pi/2,0)).lookVector*0.1) end) end val2.Value=false val.Value=true else val2.Value=true for i = 1,(DA1.Size.X*10)-10 do delay(0.01, function() lv=DA2.CFrame DA2.CFrame=lv-((lv*CFrame.Angles(0,-math.pi/2,0)).lookVector*0.1) lv=DA1.CFrame DA1.CFrame=lv-((lv*CFrame.Angles(0,math.pi/2,0)).lookVector*0.1) end) end val2.Value=false val.Value=false end end end
script.Parent.ClickDetector.MouseClick:connect(onC)
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
m27frogy
The Garbageman
avatar

Posts : 336
Join date : 2011-06-23

PostSubject: Re: My Script error   February 23rd 2013, 2:22 pm

Give us the error. The end.
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 143
Join date : 2012-07-14

PostSubject: Re: My Script error   February 23rd 2013, 3:12 pm

Yeah, I agree, you need to know the error so you can fix it. That would make it so much easier for us to help him.
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
m27frogy
The Garbageman
avatar

Posts : 336
Join date : 2011-06-23

PostSubject: Re: My Script error   February 25th 2013, 1:47 pm

Everyone's image seems to have reset. :/
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 143
Join date : 2012-07-14

PostSubject: Re: My Script error   February 25th 2013, 4:30 pm

I've been trying to get my image trick to work [ http://www.roblox.com/?BLAH=___&blah=YOURNAMEHERE ]; so that my avatar will work correctly, but it wont work, it just shows me as ROBLOX. Hmph... :'(
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
m27frogy
The Garbageman
avatar

Posts : 336
Join date : 2011-06-23

PostSubject: Re: My Script error   February 27th 2013, 10:10 am

Lol.
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 143
Join date : 2012-07-14

PostSubject: Re: My Script error   March 1st 2013, 6:36 pm

Joo just did a one word post. OH EM GEE!
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
m27frogy
The Garbageman
avatar

Posts : 336
Join date : 2011-06-23

PostSubject: Re: My Script error   March 1st 2013, 6:40 pm

We don't have any silly no one word posts rule here. Yet. :3
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
avatar

Posts : 143
Join date : 2012-07-14

PostSubject: Re: My Script error   March 1st 2013, 6:42 pm

Nice.
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
Sponsored content




PostSubject: Re: My Script error   

Back to top Go down
 
My Script error
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Blender Python script error
» Unknown script error
» 2147287038 error, please help
» NTVDM Error
» -2147287038 (Unspecified Error 0x80030002) I d/c after a few minutes of playing!

Permissions in this forum:You cannot reply to topics in this forum
A Roblox Community :: Questions and Help :: Scripting-
Jump to: