|
| 18 Oct 2011 07:08 PM |
Something to be ashamed of for me, I usually help others. >_< Can somebody fix the error in this?: v.CFrame = v.CFrame + (Workspace:findFirstChild(Name).Torso.CFrame - Vector3.new(0, 0, 10))
Output: Tue Oct 18 20:04:46 2011 - Workspace.FirstEntry:16: bad argument #2 to '?' (Vector3 expected, got userdata) Tue Oct 18 20:04:46 2011 - Script "Workspace.FirstEntry", Line 16 - global GetCloser Tue Oct 18 20:04:46 2011 - Script "Workspace.FirstEntry", Line 23 Tue Oct 18 20:04:46 2011 - stack end
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:09 PM |
Try this:
v.CFrame = v.CFrame * (Workspace:findFirstChild(Name).Torso.CFrame - Vector3.new(0, 0, 10)) |
|
|
| Report Abuse |
|
|
GoldenUrg
|
  |
| Joined: 23 Aug 2009 |
| Total Posts: 6428 |
|
|
| 18 Oct 2011 07:11 PM |
You tried to use + on 2 CFrames.
You must either use "*" or get Vector3 with ".p"
http://wiki.roblox.com/index.php/CFrame#Operators |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:11 PM |
@GoldenUrg - Haha, beat you to it. :P
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 18 Oct 2011 07:12 PM |
Uh oh!
We can't add CFrame values to other CFrame values. Instead, we must add a Vector3 value to a CFrame value. So it should possibly this?
v.CFrame = v.CFrame + (game.Workspace:FindFirstChild(Name).Torso.Position - Vector3.new(0, 0, 10))
~Flurite, ROBLOX Wiki Writer |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:12 PM |
:\ Okay, what I'm trying to do is get the parts out of a model cloned from a person to 'stalk' you. There was no error, it just flies high in the air. -- GetCloser Function function GetCloser() for _,v in pairs(model:GetChildren()) do if (v:IsA([[Part]])) then v.CFrame = v.CFrame * (Workspace:findFirstChild(Name).Torso.CFrame - Vector3.new(0, 0, 10)) v.Anchored = true end wait() end end -- Clone lines for _,v in pairs(Workspace:findFirstChild([[HaileyForever]]):GetChildren()) do if v:IsA([[Part]]) or v:IsA([[Humanoid]]) then v:Clone().Parent = model end end
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:12 PM |
I love how two people latetoasted after me. :)
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:14 PM |
Okay, so y u no use Humanoid:MoveTo(Vector3 pos, BasePart part)?
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:15 PM |
@Electric Because I don't like it. MoveTo reminds me of moving.
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:23 PM |
I seriously don't get the problem...
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:23 PM |
Run it yourself. I PMed it to you.
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:24 PM |
I didn't get a PM.
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:25 PM |
yes you did
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:25 PM |
ok now i did
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss-
|
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:27 PM |
but how do i run without u in the game
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:28 PM |
Change all the HaileyForever names to ElectricBlaze. It works better with me because my avatar is a girl.
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:29 PM |
ok
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:29 PM |
| Never be ashamed of needing help. If I never asked questions when I needed help, I wouldn't know a single thing about coding. |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:30 PM |
@crazy I managed to learn in two weeks by the Wiki. o3o
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:31 PM |
It dies.
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:32 PM |
Okay, fail explanation. I'm pretty sure it has something to do with the welds that weld all your character's parts together, but then again, I don't know. I suggest you use MoveTo, it could probably fix this.
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:34 PM |
@Electric BUT IT DOESN'T FOLLOW YOU LIKE I WANT IT ლ(ಠ益ಠლ)
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:34 PM |
@Hailey - USE MOVETO ლ(ಠ益ಠლ) NAO
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:36 PM |
LIKE THIS? v.CFrame:MoveTo(v.CFrame + (game.Workspace:FindFirstChild(Name).Torso.Position - Vector3.new(0, 0, 10)), Workspace.Base)
ლ(ಠ益ಠლ) Y I NO TEST
-You now have +20 INT from this post.- |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2011 07:38 PM |
Do you want the parts to use MoveTo or the Humanoids?
-You now have +10 INT from this post. Oh, by the way, Like an __AWESOME__ boss- |
|
|
| Report Abuse |
|
|