Top posting users this month | |
Latest topics | » Where to go from here.September 14th 2020, 1:20 pm by MrNicNac» Send me an EmailSeptember 14th 2020, 1:16 pm by MrNicNac» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]July 6th 2015, 7:38 pm by m27frogy» New Site PossiblyJuly 6th 2015, 4:16 pm by m27frogy» Ambassador!April 15th 2015, 11:40 pm by naknak» Boop - TagApril 13th 2015, 9:46 pm by naknak» Vip Class ScriptApril 13th 2015, 4:54 pm by naknak» Who's active?!April 13th 2015, 4:52 pm by naknak» Genesis PointJuly 17th 2014, 7:04 pm by branefreez» Reward SystemJuly 17th 2014, 5:41 am by m27frogy» Script RequestJuly 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 hereApril 26th 2014, 4:01 pm by altshiftkey» What's your favorite sport?January 1st 2014, 2:13 pm by m27frogy» FlashLight ScriptJanuary 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 CodingOctober 26th 2013, 1:12 pm by pook03» Simple ButtonSeptember 1st 2013, 6:19 pm by branefreez |
|
| My Script error | |
| | Author | Message |
---|
Superzachary Novice Scripter
Posts : 2 Join date : 2013-01-16
| Subject: 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) | |
| | | Superzachary Novice Scripter
Posts : 2 Join date : 2013-01-16
| Subject: Re: My Script error January 16th 2013, 7:38 pm | |
| If you can Fix it please, Its a sliding door I have click detector | |
| | | branefreez Intermediate Scripter
Posts : 143 Join date : 2012-07-14
| Subject: 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) | |
| | | m27frogy The Garbageman
Posts : 336 Join date : 2011-06-23
| Subject: Re: My Script error February 23rd 2013, 2:22 pm | |
| Give us the error. The end. | |
| | | branefreez Intermediate Scripter
Posts : 143 Join date : 2012-07-14
| Subject: 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. | |
| | | m27frogy The Garbageman
Posts : 336 Join date : 2011-06-23
| Subject: Re: My Script error February 25th 2013, 1:47 pm | |
| Everyone's image seems to have reset. :/ | |
| | | branefreez Intermediate Scripter
Posts : 143 Join date : 2012-07-14
| Subject: Re: My Script error February 25th 2013, 4:30 pm | |
| | |
| | | m27frogy The Garbageman
Posts : 336 Join date : 2011-06-23
| Subject: Re: My Script error February 27th 2013, 10:10 am | |
| | |
| | | branefreez Intermediate Scripter
Posts : 143 Join date : 2012-07-14
| Subject: Re: My Script error March 1st 2013, 6:36 pm | |
| Joo just did a one word post. OH EM GEE! | |
| | | m27frogy The Garbageman
Posts : 336 Join date : 2011-06-23
| Subject: Re: My Script error March 1st 2013, 6:40 pm | |
| We don't have any silly no one word posts rule here. Yet. :3 | |
| | | branefreez Intermediate Scripter
Posts : 143 Join date : 2012-07-14
| Subject: Re: My Script error March 1st 2013, 6:42 pm | |
| | |
| | | Sponsored content
| Subject: Re: My Script error | |
| |
| | | | My Script error | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there are 24 users online :: 0 Registered, 0 Hidden and 24 Guests
None
Most users ever online was 136 on October 21st 2024, 12:16 pm
|
| Please tell us what time zone you are in here
Got a really good idea? Post it in projects and it might show up here! |
|