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
 

Help?! Trying to work with CFrame.Orientation!

Previous Thread :: Next Thread 
JoeRaptorisBack is not online. JoeRaptorisBack
Joined: 03 Apr 2017
Total Posts: 287
11 Jul 2017 07:06 PM


local Orb = Instance.new("Part", Character)

Orb.CFrame = CFrame.new(Character.Torso.Position)
CFrame.fromOrientation(Character.Torso.Orientation) --This part doesn't work. Help!!!
Report Abuse
JoeRaptorisBack is not online. JoeRaptorisBack
Joined: 03 Apr 2017
Total Posts: 287
11 Jul 2017 07:13 PM
Help? Please?
Report Abuse
Eqicness is online. Eqicness
Joined: 30 Apr 2017
Total Posts: 283
11 Jul 2017 07:15 PM
I'm not really sure, but possibly try to remove the 'from'? Also, do you have other parts to the script, such as a part defining the Character?
Report Abuse
warswatguy14 is not online. warswatguy14
Joined: 08 Nov 2011
Total Posts: 74
11 Jul 2017 07:17 PM
What exactly are you trying to do here?

Also, in the line that doesn't work, you have to define who's CFrame that is (I assume the Orb's) so Orb.CFrame.etc...



Report Abuse
JoeRaptorisBack is not online. JoeRaptorisBack
Joined: 03 Apr 2017
Total Posts: 287
11 Jul 2017 07:22 PM
local LocalPlayer = game:GetService("Players").LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:wait()

local Orb = Instance.new("Part", Character)

game:GetService('RunService').RenderStepped:Connect(function()
Orb.Name = "Orb"
Orb.Shape = Enum.PartType.Ball
Orb.CanCollide = false
Orb.BrickColor = BrickColor.new("Bright green")
Orb.Transparency = 0.25
Orb.Size = Vector3.new(0.2,0.2,0.2)
Orb.TopSurface = Enum.SurfaceType.Smooth
Orb.BottomSurface = Enum.SurfaceType.Smooth
Orb.CFrame = CFrame.new(Character.Torso.Position)
CFrame.fromOrientation(Character.Torso.Rotation)


end)



I'm trying to get the CFrameto be the same as the x and y rotation of the player's torso.
Report Abuse
BaiYuni is not online. BaiYuni
Joined: 09 Oct 2009
Total Posts: 2861
11 Jul 2017 07:23 PM
Orb.CFrame = #################################################################################################################
Report Abuse
JoeRaptorisBack is not online. JoeRaptorisBack
Joined: 03 Apr 2017
Total Posts: 287
11 Jul 2017 07:24 PM
I get the output error, 20:17:48.618 - Players.JoeRaptorisBack.PlayerGui.LocalScript:16: bad argument #3 to 'fromOrientation' (number expected, got no value)




Help??????
Report Abuse
BaiYuni is not online. BaiYuni
Joined: 09 Oct 2009
Total Posts: 2861
11 Jul 2017 07:25 PM
local orient = Character.Torso.Orientation
Orb.CFrame = CFrame.fromOrientation(orient.X,orient.Y,orient.Z)
Report Abuse
JoeRaptorisBack is not online. JoeRaptorisBack
Joined: 03 Apr 2017
Total Posts: 287
11 Jul 2017 07:28 PM
No output errors, but it still doesn't work ingame for some reason. Help???
Report Abuse
JoeRaptorisBack is not online. JoeRaptorisBack
Joined: 03 Apr 2017
Total Posts: 287
11 Jul 2017 07:32 PM
Help??? Please???? The orentation part does not function at all.
Report Abuse
JoeRaptorisBack is not online. JoeRaptorisBack
Joined: 03 Apr 2017
Total Posts: 287
11 Jul 2017 07:36 PM
why is no one answering me anymore??? I still need help!
Report Abuse
BaiYuni is not online. BaiYuni
Joined: 09 Oct 2009
Total Posts: 2861
11 Jul 2017 07:37 PM
How does it not work... It copies my orientation.
Report Abuse
JoeRaptorisBack is not online. JoeRaptorisBack
Joined: 03 Apr 2017
Total Posts: 287
11 Jul 2017 07:44 PM
Isn't the orb supposed to turn with the character?
Report Abuse
BaiYuni is not online. BaiYuni
Joined: 09 Oct 2009
Total Posts: 2861
11 Jul 2017 07:57 PM
Why don't you use lookVector?
Report Abuse
cf27n is not online. cf27n
Joined: 13 Nov 2014
Total Posts: 106
11 Jul 2017 08:14 PM
Got it

Orb.CFrame = CFrame.new(Character.Torso.Position) * CFrame.fromOrientation(Character.Torso.Orientation)

By multiplying the Position Cframe and the Angle cframe together, it does both in one go. Hopefully this works. I haven't used fromOrientation that much.
Report Abuse
Eqicness is online. Eqicness
Joined: 30 Apr 2017
Total Posts: 283
11 Jul 2017 08:14 PM
No, unless you repeated that it won't turn with the character
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