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: CAMERA

Previous Thread :: Next Thread 
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
14 Jan 2014 04:49 PM
I want the Camera to attach to a part when you press the key, and if you press the key again you get normal camera back.

Can somebody finish this for me?;

Player = script.Parent.Parent
mouse = Player:GetMouse()

function onKeyDown(key)
key = key:lower()
if key == "j" then
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
14 Jan 2014 04:51 PM
Bump.
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
14 Jan 2014 04:54 PM
Bump
Report Abuse
VoidShredder is not online. VoidShredder
Joined: 06 Jan 2014
Total Posts: 1467
14 Jan 2014 04:56 PM
workspace.CurrentCamera.CameraSubject = thepartyouwant
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
14 Jan 2014 05:01 PM
A gun sight...
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
14 Jan 2014 05:12 PM
No, but try dissecting this.

If a Tool with this in it touches a Part in a Humanoid, Model called, "Guard", then it swaps places with any PLayer who's name is in script.Parent.Parent.Value.Value, then dollies the Camera to Models Position; then re-attaches to Player:

--local debounce = false -- not touching
local handle = script.Parent.Parent.Handle
local connection = nil

function onTouch(hit)

-- if debounce then
-- return
-- end
-- debounce = true -- touching


print("Football hit: ", hit)

if hit.Parent.Name == "Guard" then
-- local TE = hit.Parent:findFirstChild("TE")
-- if TE then

hit.Parent.AI.Jump = true

Player.CameraDolly:MoveTo(Player.Head.Position)

-- Player.CameraDolly.Ball.Position = Player.Head
camera.CameraSubject = Player.CameraDolly.Ball
camera.CameraType = "Follow"
Player.CameraDolly.SollowBall.Disabled = false


script.Parent.BodyPosition.position = Vector3.new(0, 20, 0)
Player.CameraDolly.
-- camera.CoordinateFrame = camera.CoordinateFrame + Vector3.new(0, 1, -2)

local TEpos = hit.Parent.Torso.CFrame
local Player = script.Parent.Parent.Value.Value -- passer's Torso
local Playerpos = Player.Torso.CFrame -- Torso's CFrame


hit.Parent.Torso.CFrame = Playerpos
Player.CFrame = TEpos
--print(Player, Player.Parent)
-- Player.Parent.Humanoid:MoveTo(hit.Parent.Humanoid.WalkToPoint, hit.Parent.Torso) -- Move towarwd where TE was walking




-- end

--1 [script.Parent.Parent.ObjectValue.Value].Position = hit.Parent.Torso.Position
end
connection:disconnect()
handle.BodyVelocity.P = 0 -- designed to break this script
end -- func

connection = script.Parent.Touched:connect(onTouch)
connection = script.Parent.Parent.Bell.Touched:connect(onTouch)
connection = handle.Touched:connect(onTouch)



Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
14 Jan 2014 05:18 PM
* with any Player's *Torso...

local Player = script.Parent.Parent.Value.Value -- passer's Torso
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