ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
|
| 02 Mar 2014 04:43 PM |
I have a script that you can change camera subjects like on murder mystery but it does not work
plr = game.Players.LocalPlayer mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) if key:lower()=="q" then game.Workspace.CurrentCamera.CameraSubject=game.Workspace.Rifle elseif key:lower()=="e" then game.Workspace.CurrentCamera.CameraSubject=game.Workspace.Frame end end) mouse.KeyUp:connect(function(key) if key=="q"then return end if key:lower()=="e"then return end
end)
|
|
|
| Report Abuse |
|
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
| |
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
| |
|
luigi9313
|
  |
| Joined: 07 May 2009 |
| Total Posts: 1496 |
|
|
| 03 Mar 2014 03:46 PM |
plr = game.Players.LocalPlayer mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) if key:lower() == "q" then game.Workspace.CurrentCamera.CameraSubject=game.Workspace.Rifle elseif key:lower()=="e" then game.Workspace.CurrentCamera.CameraSubject=game.Workspace.Frame end end) mouse.KeyUp:connect(function(key) return end)
To make sure: It has to be a localscript. Is this a GUI, clicked part, or tool? It's not specifying. |
|
|
| Report Abuse |
|
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
|
| 03 Mar 2014 05:04 PM |
| Just a localscript, I will implement it into a GUI soon |
|
|
| Report Abuse |
|
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
|
| 03 Mar 2014 05:10 PM |
| Yea mine worked yours does too but it can't keep on switching through the camera views |
|
|
| Report Abuse |
|
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
| |
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
| |
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
| |
|
ayub32
|
  |
| Joined: 27 Dec 2009 |
| Total Posts: 485 |
|
| |
|
|
| 03 Mar 2014 07:36 PM |
ps = {} N = 0 game.Players.PlayerAdded(function(plr) table.insert(ps, plr.Name) for I = 1,#ps do N = N + 1 end end) game.Players.PlayerRemoving(function(plr) table.remove(ps, plr.Name) N = N - 1 end) plr = game.Players.LocalPlayer mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) CurrentView = 1 if key:lower()=="q" then if CurrentView~=1 then game.Workspace.CurrentCamera.CameraSubject=game.Players[ps[CurrentView]].Character.Head else end elseif key:lower()=="e" then if CurrentView~=N then game.Workspace.CurrentCamera.CameraSubject=game.Players[ps[CurrentView]].Character.Head else end end end) mouse.KeyUp:connect(function(key) if key=="q"then return end if key:lower()=="e"then return
end
end)
--I'm not completely sure on that.. Test it |
|
|
| Report Abuse |
|
|
|
| 03 Mar 2014 07:41 PM |
OPPS;
ps = {} N = 0 game.Players.PlayerAdded(function(plr) table.insert(ps, plr.Name) for I = 1,#ps do N = N + 1 end end) game.Players.PlayerRemoving(function(plr) table.remove(ps, plr.Name) N = N - 1 end) plr = game.Players.LocalPlayer mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) CurrentView = 1 if key:lower()=="q" then if CurrentView~=1 then CurrentView = CurrentView - 1 game.Workspace.CurrentCamera.CameraSubject=game.Players[ps[CurrentView]].Character.Head elseif CurrentView==1 then CurrentView = N game.Workspace.CurrentCamera.CameraSubject=game.Players[ps[CurrentView]].Character.Head end elseif key:lower()=="e" then if CurrentView~=N then CurrentView = CurrentView + 1 game.Workspace.CurrentCamera.CameraSubject=game.Players[ps[CurrentView]].Character.Head elseif CurrentView==N then CurrentView = 1 game.Workspace.CurrentCamera.CameraSubject=game.Players[ps[CurrentView]].Character.Head end end end) mouse.KeyUp:connect(function(key) if key=="q"then return end if key:lower()=="e"then return
end
end)
--I'm not completely sure on that.. Test it (REVISED)
|
|
|
| Report Abuse |
|
|