|
| 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 |
|
|
| |
|
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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 09 Oct 2009 |
| Total Posts: 2861 |
|
|
| 11 Jul 2017 07:23 PM |
| Orb.CFrame = ################################################################################################################# |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 11 Jul 2017 07:28 PM |
| No output errors, but it still doesn't work ingame for some reason. Help??? |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2017 07:32 PM |
| Help??? Please???? The orentation part does not function at all. |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2017 07:36 PM |
| why is no one answering me anymore??? I still need help! |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 11 Jul 2017 07:44 PM |
Isn't the orb supposed to turn with the character?
|
|
|
| Report Abuse |
|
|
BaiYuni
|
  |
| Joined: 09 Oct 2009 |
| Total Posts: 2861 |
|
|
| 11 Jul 2017 07:57 PM |
| Why don't you use lookVector? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|