|
| 20 Oct 2013 02:48 PM |
This script is supposed to lock a player's camera to track a brick in the 'Scriptable' mode when a player enters, and make the GUI visible. Basically, I'm trying to write my own Entrance GUI.
print("Loaded") game.Players.PlayerAdded:connect(function(player) print("PlayerAdded") if player.TeamColor == BrickColor.new("Medium stone grey") then print("Player is Choosing") game.StarterGui.StartGUI.Frame.Visible = true print("GUI is Visible") game.Workspace.CurrentCamera.CameraSubject = game.Workspace.CameraBrick print("Camera assigned to CameraBrick") game.Workspace.CurrentCamera.CameraType = Scriptable print("CameraType Locked") else print("Player assigned to a team!") end end)
The output does not have any errors, and the only printed line is "Loaded", so there's an issue in calling the anonymous function.
I'm not smart, could someone point out my error(s) to me?
|
|
|
| Report Abuse |
|
|
Kondou
|
  |
| Joined: 05 Aug 2012 |
| Total Posts: 1148 |
|
|
| 20 Oct 2013 02:50 PM |
| Can't use PlayerAdded in Solo, only works online. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Oct 2013 02:53 PM |
| It's still not doing anything when I play the game. |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 20 Oct 2013 02:59 PM |
@Newb, 1) That's because you're changing the GUI which is in 'StarterGui', instead of the one which the player has (in their 'PlayerGui'). 2) You cannot edit the players 'Camera' from a serverside script in the way you have. 3) game.Workspace.CurrentCamera.CameraType = Scriptable ---> game.Workspace.CurrentCamera.CameraType = "Scriptable " |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2013 03:02 PM |
1) Alright 2) This is in a LocalScript 3) Thanks! |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2013 03:12 PM |
'Tis still stopping at "Loaded".
Can I use in a LocalScript? "game.Players.PlayerAdded:connect(function(player)"
|
|
|
| Report Abuse |
|
|