|
| 23 Apr 2016 07:01 PM |
local target = workspace.Camerapart local camera = workspace.CurrentCamera camera.CameraType = Enum.CameraType.Scriptable camera.CameraSubject = target
function onClick() camera.CoordinateFrame = CFrame.new(target.Position) CFrame.new(10, 10, 10) end
script.Parent.MouseButton1Click:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 07:09 PM |
"CFrame.new(10, 10, 10)"
You have this in the middle of no where, why?
|
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 07:16 PM |
i have no idea lol i'll try removing that |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Apr 2016 07:21 PM |
>make sure it's a local script.
local part = game.Workspace.Camerapart local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
function onclick() camera.CFrame = CFrame.new(part.Position) end script.Parent.MouseButton1Down:connect(onclick)
|
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 07:28 PM |
put it into a localscript and didnt work
gg |
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 07:31 PM |
This works, actually tested it. #code wait(2) local p = game.Workspace.Part local c = game.Workspace.CurrentCamera local b = script.Parent function look() c.CameraType = Enum.CameraType.Scriptable c.CFrame = CFrame.new(p.Position) end b.MouseButton1Down:connect(look)
|
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 07:37 PM |
for some weird reason it doesnt work heres what i have
StarterGui ScreenGui TextButton LocalScript
LocalScript:
Your script you posted |
|
|
| Report Abuse |
|
|
|
| 23 Apr 2016 07:38 PM |
Is your script disabled or something?
|
|
|
| Report Abuse |
|
|
| |
|
| |
|