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
 

Tweening script wont work

Previous Thread :: Next Thread 
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
19 Jun 2013 12:25 PM
"function onPlayerEntered(player)
gui:TweenPosition(UDim2.new(0, 660, 0, 45), "Out", "Float", 0.5 , true)
end"

whats my flaw?
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
19 Jun 2013 12:26 PM
'gui' is not defined
'onPlayerEntered' is not connected to an event
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
19 Jun 2013 12:28 PM
How do I fix that?
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
19 Jun 2013 12:30 PM
would it be gui = script.parent ?
and how do I connect onPlayerEntered to a event?
Report Abuse
fireheart568 is not online. fireheart568
Joined: 04 Jan 2009
Total Posts: 1285
19 Jun 2013 12:30 PM
To fix the onPlayerEntered add the line
'game.Players.ChildAdded:connect(onPlayerEntered)'
To fix the 'gui' problem, just replace 'gui' with the path to the object you want to Tween.
For example, if you want a GUI's Frame to be Tweened, and the script is a direct child of it, then you would put in 'script.Parent'
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
19 Jun 2013 12:34 PM
k i'll try that.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
19 Jun 2013 12:38 PM
"function onPlayerEntered(player)
game.Players.ChildAdded:connect(onPlayerEntered)
script.Parent:TweenPosition(UDim2.new(0, 660, 0, 45), "Out", "Float", 0.5 , true)
end"
doesn't work...
Report Abuse
fireheart568 is not online. fireheart568
Joined: 04 Jan 2009
Total Posts: 1285
19 Jun 2013 12:40 PM
No, no, no...

The connection line goes outside the function.

Like this:

function onPlayerEntered(player)
script.Parent:TweenPosition(UDim2.new(0, 660, 0, 45), "Out", "Float", 0.5 , true)
end

game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
19 Jun 2013 12:40 PM
You put the connection line after the function. Also, this again wont' work as 'script.Parent' likely isn't a GUI object, and if it is I do not understand why you're even using the 'PlayerAdded'/'ChildAdded' events...
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
19 Jun 2013 12:41 PM
the parent is a text box, and I want it to happen when the play enters.
Report Abuse
fireheart568 is not online. fireheart568
Joined: 04 Jan 2009
Total Posts: 1285
19 Jun 2013 12:45 PM
@Desperian

He is most likely using it for a 'Player PLAYERNAME has entered the game!' type GUI.

Never ask why someone is doing something, just help them fix their problems, because this is Scripting Helpers, not Game Design.
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
19 Jun 2013 12:48 PM
"function onPlayerEntered(player)
script.Parent:TweenPosition(UDim2.new(0, 660, 0, 45), "Out", "Float", 0.5 , true)
end

game.Players.ChildAdded:connect(onPlayerEntered)"

Still wont work.
does it work with text boxes, and image labels? if it doesn't thats my problem.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
20 Jun 2013 03:18 AM
@Fire,
Asking why they're doing something is quite beneficial for helping them. While you're stating it's likely a 'Player NAME has entered the game' he's not changing the text anywhere, and he's just moving it to one position, which makes it seem more like a rule screen. And if it was, he wouldn't need a connection line, nor that function. So please, do not try to lecture me.

---

@OP,
There's no such 'EasingStyle' as 'Float'.

http://wiki.roblox.com/index.php/EasingStyle_(Enum)
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
20 Jun 2013 01:01 PM
Thanks!
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