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: Small positioning script broken..

Previous Thread :: Next Thread 
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
21 Oct 2012 10:38 AM
This works:
while wait() do
script.Parent.CFrame = CFrame.new(script.Parent.Position,game.Workspace.Partt.Position)
end

But this doesn't:
m = game.Players:GetPlayerFromCharacter(script.Parent):GetMouse()
m.Move:connect(function()
game.Workspace.Body.CFrame = CFrame.new(game.Workspace.Body.Position,m.X) -- line 3
wait()
end)

I don't get why, but it doesn't work, the only difference is that it's in a different format.

Output:
11:35:53 - Workspace.Player1.Mouse:3: bad argument #2 to 'new' (Vector3 expected, got number)
11:35:53 - Script "Workspace.Player1.Mouse", Line 3
11:35:53 - stack end
11:35:53 - Disconnected event because of exception

http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information.
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
21 Oct 2012 10:40 AM
m.X returns an Integer/number, CFrame.new() requires a Vector3 or CFrame.
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
21 Oct 2012 10:41 AM
m.Hit.p.x? I tried that.

http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information.
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
21 Oct 2012 10:41 AM
What are you trying to accomplish?
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
21 Oct 2012 10:43 AM
Turret, visit su8's Tank battle to get the full idea.

http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information.
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
21 Oct 2012 10:53 AM
-_-, help..

http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information.
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