generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Spits out Players.YOURNAME

Previous Thread :: Next Thread 
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 06:23 PM
local Players = game:GetService("Players")
local player = game.Players.LocalPlayer

if game.Players.PlayerAdded then
script.Parent.Text = players:GetFullName() .. " has entered the game!"
end


I need it to not put out the Players. part

Ive literally stared at this for an hour.... help.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
19 Jul 2015 06:26 PM
try this:

game.Players.PlayerAdded:connect(function(p)
script.Parent.Text = p.Name.." has entered the game!"
end)
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 06:28 PM
no.... it still has my "Test" on when I try joining the game on studio
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
19 Jul 2015 06:29 PM
Is it a local script?
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 06:29 PM
I tried both script and localscript.

Still nothing.
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 06:41 PM
Help plox im going insane
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
19 Jul 2015 06:45 PM
Are you sure the script isnt disabled...
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 06:48 PM
Positive! Hahaha, I just need to gain sanity!

I got this far by myself and its not even done yeeet. I need to tween this darn thing. (At least I know how to do that)
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
19 Jul 2015 06:50 PM
It's in a GUI. The StarterGui replicates to the PlayerGui AFTER the player has joined, so that won't work. Just use a localscript and do game.Players.LocalPlayer:GetFullName()
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
19 Jul 2015 06:50 PM
"script.Parent.Text"
sounds like you are trying to display the text of a player's name to a gui, am i right?

use a RemoteEvent, a local script inside of your gui and the such, and a server script

-- server script

local event = game.ReplicatedStorage:WaitForChild("RemoteEvent")

game.Players.PlayerAdded:connect(function(plr)
event:FireAllClients("New Player", plr.Name)
end)

-- local script with your guis n sht

local event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
-- the path to your gui objects n sht here

event.OnClientEvent:connect(function(...)
local tuple = {...}
if tuple[1] == "New Player" then
script.Parent.Text = tuple[2]
end
end)

try that?
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 06:50 PM
OOH WAIT ITS SUPPOSED TO BE CHILDADDED CUS LOCAL SCRIPT!
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
19 Jul 2015 06:52 PM
well yes you could use ChildAdded in the local script.. still wouldn't do that though

i'd use a remote event to fire to all of the clients the new player's name, and display that new player's name to the gui.
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 06:54 PM
Ok. I see, could you link me or explain what the RemoteEvent does?

Very new to scripting and would like to know more.

I managed to get my server to recognize more than 1 person and that took about an hr too. I make it play funky moosic!

im losing my mind...
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
19 Jul 2015 06:55 PM
No don't use a remote event; there's no need for it.
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 06:57 PM
ok lord where do I put the local script? My brain is so dead right now sorry.
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 07:02 PM
local event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
game.StarterGui.ScreenGui.Frame.Textbox
event.OnClientEvent:connect(function(...)
local tuple = {...}
if tuple[1] == "New Player" then
script.Parent.Text = tuple[2]
end
end)


event in event.OnClientEvent:connect

has a squiggle red line of death.


Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
19 Jul 2015 07:13 PM
Oh well thanks for helping guys


Ill just sit in my corner
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
19 Jul 2015 07:45 PM
just put it in the StarterGui and the local script gets replicated to the PlayerGui, where it can run.
Report Abuse
Firebeats121 is not online. Firebeats121
Joined: 02 Dec 2011
Total Posts: 1728
20 Jul 2015 11:10 PM
I did
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image