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 » Scripting Helpers
Home Search
 

Re: PlayerEntered script not working

Previous Thread :: Next Thread 
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
07 Mar 2013 08:26 PM
I have made a script which is inside of gui which is to start 3 seconds after the player has entered but apparently it isn't working. Here is the script:

function onPlayerEntered(player)

wait(3)
script.Parent.UCR:TweenPosition(UDim2.new(0.3, 0, 0.15, 0), "In", "Quad", 3, true)
wait(3)
script.Parent.Bar1.Visible = true
script.Parent.Bar1:TweenSize(UDim2.new(0.45, 0, 0.05, 0), "In", "Quad", 5, true) --Start
script.Parent.Frame.Visible = true
script.Parent.REC.Visible = true
script.Parent.Logo.Visible = true
game.Workspace.PlayerEntered.Script.Disabled = true
end

game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 08:36 PM
please help
Report Abuse
HD188753 is not online. HD188753
Joined: 13 Jun 2012
Total Posts: 5021
07 Mar 2013 08:37 PM
output
also, why do you have a BC alt that looks exactly like you?
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 08:40 PM
@HD

Output says nothing.


and it isn't a bc alt, I just switched accounts recently and posted it this post by accident with my old account.
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
07 Mar 2013 08:46 PM
Where is the script located?
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 08:48 PM
inside a gui which is in StarterGui
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 09:05 PM
33 views and not a single person knows what the problem is?
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
07 Mar 2013 09:34 PM
You don't need the event. If the original GUI is put into the StarterGui, then that GUI will already be in the player. This means that the event never fires because the player is already added to the game. How else would the GUI show up without a character?

local p = Game.Players.LocalPlayer
if not p:FindFirstChild("AlreadyShown") then
Instance.new("StringValue", p).Name = "AlreadyShown"
wait(3)
script.Parent.UCR:TweenPosition(UDim2.new(0.3, 0, 0.15, 0), "In", "Quad", 3, true)
wait(3)
script.Parent.Bar1.Visible = true
script.Parent.Bar1:TweenSize(UDim2.new(0.45, 0, 0.05, 0), "In", "Quad", 5, true)
script.Parent.Frame.Visible = true
script.Parent.REC.Visible = true
script.Parent.Logo.Visible = true
game.Workspace.PlayerEntered.Script.Disabled = true
end
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 09:36 PM
@Mr

That didn't work.
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
07 Mar 2013 09:37 PM
"That didn't work."

Thanks for your long description of assisting me with finding the error!

....It'd be nice to know if there was output, or if something did happen. Or even more, if the GUI is actually in the StarterGui.
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 09:40 PM
no output error
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
07 Mar 2013 09:41 PM
Then good luck with your issue, because there are no syntax problems with my code, and you're not being of any help.
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 09:43 PM
It works if I change it into a textbutton click function.
Report Abuse
iLikePHP is not online. iLikePHP
Joined: 24 Feb 2013
Total Posts: 372
07 Mar 2013 09:48 PM
You could always do...
game.Players.ChildAdded:connect(blargh)
{ iLikePHP("official"); }
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 09:54 PM
that doesn't work
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
07 Mar 2013 10:20 PM
What NicNac said.
Report Abuse
Optiics is not online. Optiics
Joined: 05 Mar 2013
Total Posts: 1619
07 Mar 2013 10:25 PM
please explain how
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
07 Mar 2013 10:28 PM
Post the StarterGui Tree and the code.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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