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: bad argument #3 to 'Angles' (number expected, got no value)

Previous Thread :: Next Thread 
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:04 PM
local bin = script.Parent
local shelter = game.ReplicatedStorage.Shelter
local amt = bin:FindFirstChild("Amount")

local ghost = nil

function makeGhost()
ghost = shelter:clone()
ghost.Parent = game.Workspace.CurrentCamera
ghost:MakeJoints()
ghost.PrimaryPart=ghost.Primary
local g = ghost:GetChildren()
ghost:SetPrimaryPartCFrame(CFrame.Angles(bin.Parent.Torso.CFrame)) -- ERROR LINE
for i = 1,#g do
if g[i]:IsA("Part") then
g[i].Transparency = 0.7
g[i].BrickColor = BrickColor.new("Bright green")
g[i].CanCollide = false
end
end
end

function onButton1Down(mouse)
ghost:Destroy()
local model = shelter:clone()
model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.Hit.p)
local g = model:GetChildren()
for i = 1, #g do
if g[i]:IsA("Part") then
g[i].Anchored = true
end
end
amt.Value = amt.Value - 1
if amt.Value == 0 then
bin:Destroy()
if ghost then
ghost:Destroy()
ghost = nil
end
end
makeGhost()
end

bin.Equipped:connect(function(mouse)
makeGhost()
mouse.Move:connect(function()
if ghost then
mouse.TargetFilter = ghost
ghost:MoveTo(mouse.Hit.p)
end
end)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end)
bin.Unequipped:connect(function()
if ghost then
ghost:Destroy()
end
end)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jul 2014 07:11 PM
CFrame.Angles(bin.Parent.Torso.CFrame)

bin.Parent.Torso.CFrame - bin.Parent.Torso.Position
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:14 PM
Notunk, ?
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:19 PM
NOO HE WENT OFFLINE
oh my god please someone i need help on this
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Jul 2014 07:19 PM
bin.Parent.Torso.CFrame.p
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:23 PM
SAVE ME SENSEI
YOU ARE MY ONLY HOPE
01:22:11.555 - Players.Player1.Backpack.Geo.Spawner:13: bad argument #3 to 'Angles' (number expected, got no value)

ONCE AGAIN
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:26 PM
NO PLEASE DON'T IGNORE THIS THREAD NO PLEASE
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Jul 2014 07:27 PM
Are you trying to rotate the model?
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:27 PM
Well, I'm trying to make it so the model is facing the same direction as my torso.
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
20 Jul 2014 07:27 PM
Replace the line that errors with this:

ghost:SetPrimaryPartCFrame(bin.Parent.Torso.CFrame - bin.Parent.Torso.CFrame.p) -- ERROR LINE
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:32 PM
@Casu

https://twitter.com/RokinRonan/status/491017522909827073/photo/1

I tried it and this happens.
The model is upside down and at an angle.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jul 2014 07:36 PM
The line with the error, replace

CFrame.Angles(bin.Parent.Torso.CFrame)

with

bin.Parent.Torso.CFrame - bin.Parent.Torso.Position
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:36 PM
SAVE ME SENSEI OR WHOEVER
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:37 PM
@notunknown
did the same thing as in the previous screenshot i posted
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jul 2014 07:38 PM
Set the primary part to something not rotated :)
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:41 PM
Ah, no longer tilted, you are genius omg
but it is still not facing my torso position
instead, it changes the rotation every time i place a new shelter :/
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jul 2014 07:43 PM
Create a part called "MainPart" and use that as the PrimaryPart.
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:46 PM
Just did it, but what difference should that make? It made no difference.
Would you like me to link you to a place where you can see what it does for yourself?
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:51 PM
oh. now he's offline
damnit
DASJCASDASD
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
20 Jul 2014 07:56 PM
What are you trying to do
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 07:59 PM
Basically, I want it like this:
http://youtu.be/NvQJvYAm92Y?t=2m22s

You see how the model is always in front of his character when he's placing it?
Like that.
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 08:03 PM
anyone
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jul 2014 08:04 PM
What do you set the primary part to?
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 08:07 PM
uploaded screenshot
https://twitter.com/RokinRonan/status/491026556257828864/photo/1

invisible brick in center of model
Report Abuse
Phyclops is not online. Phyclops
Joined: 27 Sep 2012
Total Posts: 5895
20 Jul 2014 08:12 PM
this is the part where the thread becomes inactive
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