|
| 16 Dec 2012 08:27 AM |
Now that I have your attention. When I start the function nothing happens?
--1234Christopher's Curtain
local c = script.Parent
function onClicked(player) if c.Size == Vector3.new(3, 13.2, 1) then c.Size = Vector3.new(4, 13.2, 1) c.CFrame = CFrame.new(-77, 256.9, -3) wait(0.1) c.Size = Vector3.new(5, 13.2, 1) c.CFrame = CFrame.new(-76.5, 256.9, -3) wait(0.1) c.Size = Vector3.new(6, 13.2, 1) c.CFrame = CFrame.new(-76, 256.9, -3) wait(0.1) c.Size = Vector3.new(7, 13.2, 1) c.CFrame = CFrame.new(-75.5, 256.9, -3) wait(0.1) c.Size = Vector3.new(8, 13.2, 1) c.CFrame = CFrame.new(-75, 256.9, -3) end
if c.Size == Vector3.new(8, 13.2, 1) then c.Size = Vector3.new(7, 13.2, 1) c.CFrame = CFrame.new(-75.5, 256.9, -3) wait(0.1) c.Size = Vector3.new(6, 13.2, 1) c.CFrame = CFrame.new(-76, 256.9, -3) wait(0.1) c.Size = Vector3.new(5, 13.2, 1) c.CFrame = CFrame.new(-76.5, 256.9, -3) wait(0.1) c.Size = Vector3.new(4, 13.2, 1) c.CFrame = CFrame.new(-77, 256.9, -3) wait(0.1) c.Size = Vector3.new(3, 13.2, 1) c.CFrame = CFrame.new(-77.5, 256.9, -3) wait(0.1) end
end c.ClickDetector.MouseClick:connect(onClicked)
HELP? |
|
|
| Report Abuse |
|
|
| 16 Dec 2012 08:28 AM |
You've posted that like 3 times. Nobody replies because : - You're not saying anything about the output; - You're not even giving a hint about where it goes wrong; - The script is really inefficient. |
|
|
| Report Abuse |
|
|
| 16 Dec 2012 08:35 AM |
- The output doesn't say anything - Nothing happens when I start the function (I click the part and it doesn't change size or position) - Help make the script better if you think it's rubbish. |
|
|
| Report Abuse |
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
| 16 Dec 2012 08:39 AM |
x = true
function open() -- stuff end
function close() -- stuff end
script.Parent.ClickDetector.MouseClick:connect(function() if x then open() else close() end
x = not x
end) |
|
|
| Report Abuse |
|
|
| 16 Dec 2012 08:41 AM |
I have check my parts size (It's right) I will try Free's better script structure. |
|
|
| Report Abuse |
|
|
| 16 Dec 2012 08:42 AM |
| it's not better, it's just a little bit clearer. |
|
|
| Report Abuse |
|
|
| 16 Dec 2012 08:45 AM |
Thanks Free! You forgot the ")" at the end But I fixed that and it works, although I haven't learned that structure I see it works well- Thanks. |
|
|
| Report Abuse |
|