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
 

The Output is giving me mixed errors

Previous Thread :: Next Thread 
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
19 Dec 2013 07:21 PM
When I type

pa:vectorToWorldSpace(0, 0, 0)
I get :19:18:07.563 - Workspace.Part.ThickNodeScript:9: bad argument #1 to 'vectorToWorldSpace' (Vector3 expected, got number)

So i add a vector3
pa:vectorToWorldSpace(Vector3.new(0, 0, 0))
I get: 19:18:21.854 - Workspace.Part.ThickNodeScript:9: bad argument #3 to 'CFrame' (CFrame expected, got userdata)

So I change it to a CFrame
pa:vectorToWorldSpace(CFrame.new(0, 0, 0))
Then I get: 19:19:04.751 - Workspace.Part.ThickNodeScript:9: bad argument #1 to 'vectorToWorldSpace' (Vector3 expected, got userdata)


Why can't the output make up it's frickin mind?
Report Abuse
shotgreen999 is not online. shotgreen999
Joined: 29 Nov 2009
Total Posts: 376
19 Dec 2013 07:58 PM
"pa" what is it?
Sounds like it is not a CFrame.
Also vectorToWorldSpace returns a value so you need a variable for that as well.
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
19 Dec 2013 08:00 PM
pa = script.Parent.CFrame

local bots = game.Workspace.FakeTeam:GetChildren()
for i = 1, #bots do
bots[i].CFrame = (pa + pa.lookVector*50)
* CFrame.Angles(0, 0, math.rad(360/#bots)*i)
* CFrame.new(0, 20, 0)
* CFrame.Angles(0, math.pi, 0)

end


I removed it temporarily to put the parts back to where they're supposed to go.

I got them to finally work, but I can't get them to CFrame upright so that TopSurfaces actually point UP.
Report Abuse
shotgreen999 is not online. shotgreen999
Joined: 29 Nov 2009
Total Posts: 376
19 Dec 2013 08:04 PM
So you need to know how to make them point up?
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
19 Dec 2013 08:08 PM
not the FrontSurface. I got the parts to form a circular formation and point in the direction of the base part without pointing directly at it. The problem is that their BottomSurfaces are all pointing to the center of the formation. I need the parts to sit upright so that their BottomSurfaces actually point down and the TopSurfaces actually point up without affecting the direction of their lookVector.
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