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 » Scripters
Home Search
 

Re: Whats wrong with this?;

Previous Thread :: Next Thread 
ipadboy123 is not online. ipadboy123
Joined: 05 Apr 2010
Total Posts: 6475
03 Dec 2014 12:11 PM
floaty = script.Parent

while true do
function move()

for x = 1,19 do
floaty.Position = floaty.Position + Vector3.new(-1,0,0)

end
end

floaty.ClickDetector.MouseClick:connect(move)

Report Abuse
adeep is not online. adeep
Joined: 06 Feb 2010
Total Posts: 274
03 Dec 2014 12:13 PM
Why do you have a while true do in their?

Code-

floaty = script.Parent

function move()

for x = 1,19 do
floaty.Position = floaty.Position + Vector3.new(-1,0,0)

end

floaty.ClickDetector.MouseClick:connect(move)
Report Abuse
ipadboy123 is not online. ipadboy123
Joined: 05 Apr 2010
Total Posts: 6475
03 Dec 2014 12:13 PM
it says expected 'end' to close to 'while' at line 3
Report Abuse
ipadboy123 is not online. ipadboy123
Joined: 05 Apr 2010
Total Posts: 6475
03 Dec 2014 12:13 PM
i'd like it to repeat the function for 19 studs.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
03 Dec 2014 12:14 PM
You are missing an end.
But don't declare functions in a loop, that is nonsense.
Report Abuse
adeep is not online. adeep
Joined: 06 Feb 2010
Total Posts: 274
03 Dec 2014 12:14 PM
Sorry forgot an end

Code-

floaty = script.Parent

function move()

for x = 1,19 do
floaty.Position = floaty.Position + Vector3.new(-1,0,0)

end
end

floaty.ClickDetector.MouseClick:connect(move)
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
03 Dec 2014 12:15 PM
while true do
function move()

OH NO NO NO STOP WH4T YOU 4R3 DO1NG G3T TH4T LOOP OUT OF TH3R3 R1GHT NOW
Report Abuse
ipadboy123 is not online. ipadboy123
Joined: 05 Apr 2010
Total Posts: 6475
03 Dec 2014 12:15 PM
How about this?;

floaty = script.Parent

function move()

while true do
for x = 1,19 do
floaty.Position = floaty.Position + Vector3.new(-1,0,0)

end
end

floaty.ClickDetector.MouseClick:connect(move)

Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
03 Dec 2014 12:16 PM
Oh, also, put the connection before the infinite loop.
Report Abuse
adeep is not online. adeep
Joined: 06 Feb 2010
Total Posts: 274
03 Dec 2014 12:22 PM
Your missing an end.
Report Abuse
adeep is not online. adeep
Joined: 06 Feb 2010
Total Posts: 274
03 Dec 2014 12:23 PM
You going to crash you studio XD, add some sort waiting function

Bad-

floaty = script.Parent

function move()

while true do
for x = 1,19 do
floaty.Position = floaty.Position + Vector3.new(-1,0,0)

end
end

floaty.ClickDetector.MouseClick:connect(move)

Ex. Code-

floaty = script.Parent

function move()

while true do
for x = 1,19 do
floaty.Position = floaty.Position + Vector3.new(-1,0,0)
wait() -- this wait 1/30 of a second.

end
end
end

floaty.ClickDetector.MouseClick:connect(move)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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