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 » Scripting Helpers
Home Search
 

Re: OMG Look At This!

Previous Thread :: Next Thread 
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
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
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
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
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
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 is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
16 Dec 2012 08:38 AM
[ Content Deleted ]
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
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
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
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
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
16 Dec 2012 08:42 AM
it's not better, it's just a little bit clearer.
Report Abuse
1234Christopher is not online. 1234Christopher
Joined: 21 Oct 2008
Total Posts: 1715
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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