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: I need help fixing this small script

Previous Thread :: Next Thread 
dssdd253 is not online. dssdd253
Joined: 29 Jun 2012
Total Posts: 4452
29 Jun 2013 04:18 PM
P=game.Workspace.Part


for i=1,100 do

P.CFrame=CFrame.new[i,0.9,0]
wait()
end






I have no idea what went wrong.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
29 Jun 2013 04:19 PM
P.CFrame = CFrame.new(i, 0.9, 0)
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
29 Jun 2013 04:20 PM
Methods (such as CFrame.new) are called with parenthesis, not brackets.

P=game.Workspace.Part
for i=1,100 do
   P.CFrame=CFrame.new(i,0.9,0)
   wait()
end
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
29 Jun 2013 04:22 PM
p = game.Workspace.Part
for i = 1,100 do
p.CFrame = CFrame.new(i,0,0)
wait()
end

That should work perfectly. Perhaps it's that you don't put spaces for your =, or that you used [] instead of ()
Report Abuse
michael1784 is not online. michael1784
Joined: 15 Feb 2011
Total Posts: 3322
29 Jun 2013 04:27 PM
Put spaces with your '='
i.e P = game.Workspace.Part
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
29 Jun 2013 04:28 PM
You don't have to put spaces, when it compiles it ignores spaces. Spaces just make it easier for us to read.
Report Abuse
dssdd253 is not online. dssdd253
Joined: 29 Jun 2012
Total Posts: 4452
29 Jun 2013 04:53 PM
Thanks with the parenthises thing the spaces don't matter btw
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