|
| 04 Aug 2011 04:37 AM |
local player = game.Players.LocalPlayer local camera = game.Workspace.CurrentCamera local humanoid = player.Character:FindFirstChild("Humanoid") function OnPlayerAdded(player) wait(5) local part = Instance.new("Part") part.Parent = game.Workspace part.Cframe = Cframe.new(game.Workspace.PIE.Position)--PIE is a brick in the Workspace part.Transparency = 1 part.CanCollide = false camera.CameraSubject = game.Workspace.part camera.CameraType = "Attach" wait(10) camera.CameraSubject = humanoid camera.CameraType = "Custom" end ---------------------------------------------------------------------------- The above script is in a localscript and is meant to change the current camera view to a brick in the workspace called PIE. However, I don't know what went wrong as it isn't working.Someone, please help me! |
|
|
| Report Abuse |
|
|
|
| 04 Aug 2011 04:38 AM |
| Send me a message if possible or write in the forum but i would appreciate messages |
|
|
| Report Abuse |
|
|
Megolas
|
  |
| Joined: 16 Jan 2011 |
| Total Posts: 357 |
|
|
| 04 Aug 2011 04:48 AM |
| is the script inside player/character? Also, is there any output? Give us a starting point ;) |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 02:52 AM |
| Well, the script is in workspace but how do i put it in player/character? I thought it was already wriiten down in the script |
|
|
| Report Abuse |
|
|
scepile3
|
  |
| Joined: 27 Feb 2009 |
| Total Posts: 260 |
|
|
| 07 Aug 2011 03:04 AM |
'.' This script is... strange. In the first lines you have: local player = game.Players.LocalPlayer local camera = game.Workspace.CurrentCamera
Which would only work in a local script. Later you have: function OnPlayerAdded(player)
which is just a generic function named OnPlayerAdded. If you were planning to use an event for this, it doesn't make sense... Why would you try to use two ways of getting the player, when those ways aren't compatible?
Also, Cframe is supposed to be spelled CFrame in the following line: part.Cframe = Cframe.new(game.Workspace.PIE.Position)--PIE is a brick in the Workspace
Caps do matter. '.' |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 03:58 AM |
Add the connection line aswell
game.Players.ChildAdded:connect(OnPlayerAdded)
|
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 03:59 AM |
| Well you aren't calling the function anywhere |
|
|
| Report Abuse |
|
|