|
| 18 Nov 2012 08:31 PM |
Here is the script.
Bt1 = Script.Parent.Parent.btn1
function onClicked(mouse)
Bt1.ClickDetector.MaxActivationDistance = 0
script.Parent.ClickDetector.MouseClick:connect(onClicked)
end
Originally, the brick it was in was on it's own in the workspace and the "Script.Parent.Parent" was "game.Workspace.Elevator.Bt1" but that gave me an error in the output. So I grouped it.
What have I done wrong? |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:33 PM |
The event calling the Function can't be in the Function itself unless You're repeating it.
Bt1 = Script.Parent.Parent.btn1
function onClicked() Bt1.ClickDetector.MaxActivationDistance = 0 end
script.Parent.ClickDetector.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:39 PM |
While I've got you here, can you explain what "eof" is? I got it in the output for another script and it says that there was an exepected one at line 48 or something.
(for a different script!) |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:40 PM |
| eof stands for "end of function" |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:41 PM |
| I figured that, but what would that look like? Exactly that? Just put "end of function" at line 48? |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:43 PM |
| What is the entire output? |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:44 PM |
| Every time I try and post it, it gives me an error. Do you want me to post the enitre script and you could give it a look? |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:45 PM |
eof end of function
you need an end an end) or a connection line.
|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind? |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Nov 2012 08:45 PM |
on line 48, or an end for line 48
|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind? |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:47 PM |
Here it is. The "door" is supposed to go down, then come back up. However it goes down, then stays down.
open = script.Parent.Parent.Open ready = script.Parent.Parent.Ready move = script.Parent.Parent.Move.Value speed = script.Parent.Parent.Speed.Value M = script.Parent.Parent.DecalChanger.Sign
function go()
if open.Value == false then if ready.Value then ready.Value = false open.Value = true M.Texture = "http://www.roblox.com/asset/?id=97854675" wait(2) M.Texture = "http://www.roblox.com/asset/?id=97854703"
for i = 1,move do wait(speed) for i,v in pairs(script.Parent.Parent:GetChildren()) do if v.Name == "Door" then v.CFrame = v.CFrame + Vector3.new(0,-0.3,0)
for i = 1,move do wait(speed) for i,v in pairs(script.Parent.Parent:GetChildren()) do if v.Name == "Door" then v.CFrame = v.CFrame + Vector3.new(0,0.3,0) M.Texture = "http://www.roblox.com/asset/?id=97854734" end end end ready.Value = true end end
end end end end end end script.Parent.ClickDetector.MouseClick:connect(go) |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:49 PM |
Too many ends.
Remove.... 3 I believe. |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 08:50 PM |
| It kept saying in the output that ends were expected. I kept adding them until it stopped. So, remove three? Then the script should work? |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Nov 2012 08:57 PM |
Alright, two things.
1. It doesn't work, the door doesn't even go down anymore.
2. The first model doesn't work. The buttons turn reflective when I click them, which leads me to believe that the other script (that turns the other elevator buttons refelctive is interfering)
*I have to go in RL for a couple minutes, I'll post here/message you when I'm back. |
|
|
| Report Abuse |
|
|
|
| 18 Nov 2012 09:10 PM |
| Back, figure anything out? |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Nov 2012 09:17 PM |
| I would go into Studio and fix this but I gotta go to bed, Sorry. |
|
|
| Report Abuse |
|
|