sal212
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 2929 |
|
|
| 20 Oct 2015 08:22 PM |
wait(6.8) game.Workspace.ScreenGui:Clone().Parent = game.Players.LocalPlayer.PlayerGui
How would this appear for all players and work? It works in studio, but not ingame (Its in a normal script even though it includes LocalPlayer because local script wouldnt work.) So whats an alternative way for doing this and work? |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 08:23 PM |
| You should probably store ScreenGui in ReplicatedStorage. |
|
|
| Report Abuse |
|
|
sal212
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 2929 |
|
|
| 20 Oct 2015 08:25 PM |
Fixed, I think.
game.Players.PlayerAdded:connect(function(player) wait(6.8) game.Workspace.ScreenGui:Clone().Parent = player.PlayerGui end) |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 08:27 PM |
| You should use ReplicatedStorage |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 08:27 PM |
| or put it in startergui, then add a wait in the localscript |
|
|
| Report Abuse |
|
|
sal212
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 2929 |
|
|
| 20 Oct 2015 08:27 PM |
Doesnt work?
game.Players.PlayerAdded:connect(function(player) wait(6.8) game.ReplicatedStorage.ScreenGui:Clone().Parent = player.PlayerGui end) |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 08:28 PM |
| you can't fire playeradded from a localscript, do this |
|
|
| Report Abuse |
|
|
sal212
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 2929 |
|
| |
|
|
| 20 Oct 2015 08:29 PM |
whoops forgot to put what to do
but are you familiar with RemoteEvents? |
|
|
| Report Abuse |
|
|
sal212
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 2929 |
|
| |
|
|
| 20 Oct 2015 08:32 PM |
well, here's a little tutorial since you want something to appear for everyone
*in a server script local RemoteEvent = Instance.new('RemoteEvent',game.ReplicatedStorage) RemoteEvent.Name = ('Event')
RemoteEvent:FireAllClients() -- This will send out a connection to all players ingame
*in a local script local RemoteEvent = game.ReplicatedStorage:WaitForChild('Event')
Event.OnClientEvent:connect(function() -- do stuff end) |
|
|
| Report Abuse |
|
|
sal212
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 2929 |
|
|
| 20 Oct 2015 08:33 PM |
Why isnt this script working also?
function Click() local camera = workspace.CurrentCamera camera.CameraSubject = game.Players.LocalPlayer end
script.Parent.MouseButton1Click:connect(Click)
Its in a local script. |
|
|
| Report Abuse |
|
|
sal212
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 2929 |
|
|
| 20 Oct 2015 08:34 PM |
| I think its because I have another script that circles around an object for my intro... |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2015 08:34 PM |
becuase CameraSubject takes a model, part or humanoid. http://wiki.roblox.com/index.php?title=CameraSubject |
|
|
| Report Abuse |
|
|
sal212
|
  |
| Joined: 11 Apr 2010 |
| Total Posts: 2929 |
|
|
| 20 Oct 2015 08:36 PM |
Still not working, ?
function Click() local camera = workspace.CurrentCamera camera.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid end
script.Parent.MouseButton1Click:connect(Click) |
|
|
| Report Abuse |
|
|