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: how do i make a script so a model will delete after 5 secs

Previous Thread :: Next Thread 
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 10:19 AM
??? help
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 10:20 AM
and i want the script inside the model
Report Abuse
Em_ily is not online. Em_ily
Joined: 21 Jan 2014
Total Posts: 1708
21 Jul 2017 10:21 AM
wait(5)
script.Parent:Destroy()
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
21 Jul 2017 10:23 AM
game:GetService("Debris"):AddItem(model,5)
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 10:29 AM
whats the difference between remove and destroy
Report Abuse
qrushed is not online. qrushed
Joined: 10 Apr 2012
Total Posts: 587
21 Jul 2017 10:29 AM
remove: Don't use this
Destroy: use this.

That's all you need to know <3
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
21 Jul 2017 10:30 AM
they both do the same thing for an instance, but one is deprecated in favour of the other.
Report Abuse
qrushed is not online. qrushed
Joined: 10 Apr 2012
Total Posts: 587
21 Jul 2017 10:30 AM
that's a really vague explanation, they don't do the same thing. use Destroy() not remove()
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
21 Jul 2017 10:32 AM
how so?

Destroy and Remove are to eradicate the object.
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
21 Jul 2017 10:32 AM
but Remove is deprecated in favour of destroy
Report Abuse
qrushed is not online. qrushed
Joined: 10 Apr 2012
Total Posts: 587
21 Jul 2017 10:33 AM
there's way too many conversations on deprecated methods. pls, no. just wiki.roblox.com it d00d
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 10:35 AM
get over it
Report Abuse
qrushed is not online. qrushed
Joined: 10 Apr 2012
Total Posts: 587
21 Jul 2017 10:36 AM
idk where that came from ^
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 10:36 AM
also i need help on something else, what would the cordinates be to have the gui at the center and bottom of the screen?
Report Abuse
qrushed is not online. qrushed
Joined: 10 Apr 2012
Total Posts: 587
21 Jul 2017 10:38 AM
gui.AnchorPoint = (0.5, 0.5)
gui.Position = UDim2.new(0.5, 0, 0.5, 0)

OR

gui.Size = UDim2.new(x, 0, y, 0)
gui.Position = UDim2.new(0.5 - x/2, 0, 0.5 - y/2, 0)

OR

gui.Position = UDim2.new(0, screenGui.AbsoluteSize.X/2, 0, screenGui.AbsoluteSize.Y/2)
Report Abuse
qrushed is not online. qrushed
Joined: 10 Apr 2012
Total Posts: 587
21 Jul 2017 10:40 AM
oops, the first example is Vector2.new(0.5, 0.5) my apologies
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
21 Jul 2017 10:40 AM
{0.5,-(gui.Size.X.Offset/2),{0,(Y offset)}

Just change the Y offset
Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
21 Jul 2017 10:41 AM
{0.5,-(gui.Size.X.Offset/2)}*
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 10:43 AM
doesnt work, this is for a gui script


local sg = Instance.new("ScreenGui", nP.PlayerGui)
sg.Name = "Welcome"
local fr = Instance.new("Frame", sg)
fr.Size = UDim2.new(0, 0, 0, 0)
fr.Position = UDim2.new(0.5, 0, 0.5, 0)
fr.Style = "Custom"
Report Abuse
Briicks is online. Briicks
Joined: 03 Apr 2015
Total Posts: 1796
21 Jul 2017 10:46 AM
first off, dont parent it in the instance, it's slower.
use .Parent = nP.PlayerGui

and another thing, frames are auto set to Custom so no need to set that


Report Abuse
qrushed is not online. qrushed
Joined: 10 Apr 2012
Total Posts: 587
21 Jul 2017 10:47 AM
>did he try any of my examples
Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
21 Jul 2017 10:49 AM
I believe remove() sets a instance's parent to nil, and destroy() actually gets rid of the instance and any pointers/references to the instance.


Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 10:49 AM
helooo
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 10:50 AM
0.5,0.5 just sets it to the top of the screen
Report Abuse
Robloxinaterr is not online. Robloxinaterr
Joined: 26 Jul 2014
Total Posts: 14824
21 Jul 2017 11:11 AM
thanks alot froobs, gottum (0.5, 0, 0.950, 0.0)
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