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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why isn't this valid? o.O

Previous Thread :: Next Thread 
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 03:14 PM
x.CFrame = CFrame.new(player.Character.Torso.Position - Vector3.new(0,-5,0))
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
16 Aug 2013 03:15 PM
Cframe = Cframe

You cant do this.
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 03:17 PM
Sooo...
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
16 Aug 2013 03:18 PM
Go to wiki and type Cframe
You need to Times it but I dont think I remember how you Times it.

*
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
16 Aug 2013 03:18 PM
@king That made no sense... and you're incorrect.

@OP output?
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 03:19 PM
Workspace.Player1.Ataro No Ryuuken.Shunpo:11: ')' expected near ','
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
16 Aug 2013 03:19 PM
x.CFrame = x.CFrame * CFrame.new(player.Character.Torso.Position - Vector3.new(0,-5,0))
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
16 Aug 2013 03:20 PM
.. I was thinking about rotating becuase thats all I use..
Never mind. Dont think you can - a vector3 from a Cframe.
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
16 Aug 2013 03:20 PM
HAH I WAS RIGHT IN THE FIRST PLACE!
Well 80% right.
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 03:22 PM
Didn't work, same output.
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
16 Aug 2013 03:27 PM
post the output so we know more.
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 03:28 PM
Workspace.Player1.Ataro No Ryuuken.Shunpo:11: ')' expected near ','
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
16 Aug 2013 03:29 PM
Try this maybe.

x.CFrame = CFrame.new(Vector3.new(player.Character.Torso.Position - Vector3.new(0, -5, 0)))
Report Abuse
gamehero is not online. gamehero
Joined: 12 Jun 2007
Total Posts: 1455
16 Aug 2013 03:38 PM
"Ataro No Ryuuken"...

It wouldn't be the spaces messing things up, would it? Are you posting the real script with the actual variable names?
If so, then this is what you have to do for objects with spaces in their names...

workspace.Player1["Annoying Spaced Object Name Lol"].Position
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 03:40 PM
Nope, I don't know what the problem is, it show the same output everytime.
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
16 Aug 2013 03:45 PM
You can try posting the whole script. Unlike everyone else I actually take the time to read long posts.
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 03:46 PM
local player = game.Players.LocalPlayer
script.Parent.Equipped:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if key:lower() == "x" then
player.Character:MoveTo(mouse.Hit.p)
x = Instance.new("Part", game.Workspace)
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Shape = "Ball"
x.BrickColor = BrickColor.new("Bright yellow")
x.Size = (6,6,6)
x.CFrame = CFrame.new(Vector3.new(player.Character.Torso.Position - Vector3.new(0, -5, 0)))
end
end)
end)
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 03:55 PM
Bump
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
16 Aug 2013 03:57 PM
x.Size = Vector3.new(6,6,6)
x.CFrame = CFrame.new(player.Character.Torso.Position) + Vector3.new(0, 5, 0)

--You were subtracting a vector with a negative value, which is the same as adding.
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 04:00 PM
Workspace.Player1.Ataro No Ryuuken.Shunpo:11: ')' expected near ','
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 04:05 PM
Bump
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
16 Aug 2013 04:11 PM
x.CFrame = player.Character.Torso.Position - Vector3.new(0, -5, 0)




~Try my new game, Volcano Survival!~

http://www.roblox.com/Volcano-Survival-8-15-13-SHOP-GAME-PASS-ADDED-place?id=122351602
Report Abuse
gamehero is not online. gamehero
Joined: 12 Jun 2007
Total Posts: 1455
16 Aug 2013 04:13 PM
CodyTheBuildingKid beat me to it, but I'll just paste the whole script with the fix.
I tested it, it works.

local player = game.Players.LocalPlayer
script.Parent.Equipped:connect(function(mouse)
mouse.KeyDown:connect(function(key)
if key:lower() == "x" then
player.Character:MoveTo(mouse.Hit.p)
x = Instance.new("Part", game.Workspace)
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Shape = "Ball"
x.BrickColor = BrickColor.new("Bright yellow")
x.Size = Vector3.new(6,6,6)
x.CFrame = CFrame.new(Vector3.new(player.Character.Torso.Position - Vector3.new(0, -5, 0)))
end
end)
end)
Report Abuse
Kasumo is not online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
16 Aug 2013 04:23 PM
Thank yer guys. :3
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
16 Aug 2013 04:25 PM
hey od me

also

_v, in pairs "k"
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