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
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
|
| 14 Jan 2014 04:56 PM |
workspace.CurrentCamera.CameraSubject = thepartyouwant
|
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
|
| 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 |
|
|
|
| 14 Jan 2014 05:18 PM |
* with any Player's *Torso...
local Player = script.Parent.Parent.Value.Value -- passer's Torso |
|
|
| Report Abuse |
|
|