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: Players.Player.PlayerGui.Cam:25: bad argument #3 to '?' (CFrame expected, got userdata)

Previous Thread :: Next Thread 
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
15 Jan 2012 04:52 PM
    local cam = game.Workspace.CurrentCamera
    cam.CoordinateFrame = Workspace.Cams["1"].CFrame * CFrame.new(0, 0, 5)
    lord = game.Workspace["DH Lord"]
    lord.Name = "DH Lord: "
    wait(2)
    lord.Name = "DH Lord"
    wait(1)
    local Pos1 = Vector3.new(274.5,230.6,-26.5)
    local Pos2 = Vector3.new(274.5,236.2,-19.5)
    for ratio = 0,1,0.1 do
    wait()
    NewPosition = Pos1:lerp(Pos2, ratio)
    cam.Focus = NewPosition
    end 

Output: Title
***It's supposed to move the game to a Part named 1 then name the DH lord a diffrent name then lerp the cam***

It's not easy being cheesy.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
15 Jan 2012 04:59 PM
Which one is line 25?
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
15 Jan 2012 05:00 PM
    cam.Focus = NewPosition

It's not easy being cheesy.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
15 Jan 2012 05:01 PM
The Focus is a CFrame.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
15 Jan 2012 05:03 PM
Well how do I CFrame it?

It's not easy being cheesy.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
15 Jan 2012 05:03 PM
CFrame.new(NewPosition)
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
15 Jan 2012 05:05 PM
So when I do

    pos = CFrame.new(274.5,230.6,-26.5)
    pos2 = CFrame.new(274.5,236.2,-19.5)
    for r = 0,1,0.1 do
    wait(0.01)
    cam.CoordinateFrame = pos:Lerp(pos2, r)
    end

The output is: Lerp is not a valid member

It's not easy being cheesy.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
15 Jan 2012 05:09 PM
cam_rot = cam.CoordinateFrame - cam.CoordinateFrame.p
cam.CoordinateFrame = cam.CoordinateFrame.p:Lerp(Pos2.p, r) * cam_rot

Try that.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
15 Jan 2012 05:11 PM
p is not a valid member

It's not easy being cheesy.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
15 Jan 2012 05:13 PM
What line does it say that?
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
15 Jan 2012 05:14 PM
cam.CoordinateFrame = cam.CoordinateFrame.p:Lerp(Pos2.p, r) * cam_rot

It's not easy being cheesy.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
15 Jan 2012 05:17 PM
Are you sure that Pos2 is a CFrame?
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
15 Jan 2012 05:18 PM
yes

It's not easy being cheesy.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
15 Jan 2012 05:19 PM
Then I don't know.
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