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: I need some help.

Previous Thread :: Next Thread 
LonlyWolf1 is not online. LonlyWolf1
Joined: 26 May 2010
Total Posts: 381
03 Nov 2016 06:27 AM
Hello felow Robloxians!

I need a huge favor.
Im working on a game and part of it includes that once you touch a certain part the model its in falls apart (unancors).
I am able to make it so that it unancors each part seperatly but I need a script that would unancor any model, on the same principal as I sad before (once a certain brick is touched the model its in falls apart).
I would be eternaly gratfull to anyone that could provide me with sutch a script.

Thank you in andvance!
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
03 Nov 2016 08:51 AM
Pretty sure this would work, at school so haven't tested it :P

local model = game.Workspace.Model
local part = model:GetChildren()
part.Touched:connect(function(p)
if p.Parent and p.Parent.Humanoid then
for i = 1,#part do
part[i].Anchored = false
wait()
end
end
end)
Report Abuse
Exfiltrate is not online. Exfiltrate
Joined: 29 Mar 2013
Total Posts: 10917
03 Nov 2016 09:24 AM
2
Report Abuse
LonlyWolf1 is not online. LonlyWolf1
Joined: 26 May 2010
Total Posts: 381
03 Nov 2016 12:02 PM
Either im doiung it wrong or it wont work.
Probably the first one.
Here the the original script im using to break the model.

local p = script.Parent.Parent


function onTouched(hit)
wait(.5)
p.W1.Anchored = false
p.W2.Anchored = false
p.W3.Anchored = false
p.W4.Anchored = false
p.W5.Anchored = false
p.W6.Anchored = false
p.W7.Anchored = false
p.W8.Anchored = false
p.P1.Anchored = false
p.P2.Anchored = false
p.P3.Anchored = false
p.P4.Anchored = false
p.P5.Anchored = false

end

script.Parent.Touched:connect(onTouched)
Report Abuse
synzoxre13 is not online. synzoxre13
Joined: 26 Sep 2016
Total Posts: 45
03 Nov 2016 12:41 PM
local function unAnchor(b)
script.Parent.Parent = b
for _,v in pairs(b:GetChildren(_))do
if v:IsA("Part") then
v.Anchored = false
end
end

return unAnchor
end


script.Parent.Touched:connect(function()
local runFunction = unAnchor(script.Parent.Parent)
end)



Damn I can't believe I came up with this, I only been scripting close to 3 weeks :p

Anyways, you got a folder with a bunch of parts in it. Put this script in one of the parts inside that folder. The part that has the script in it will be the part to be touched. Everything inside the folder if IsA("Part") will unanchor. Or at least it should, it worked for me in studio.

Report Abuse
rhinoman360 is not online. rhinoman360
Joined: 27 Jul 2012
Total Posts: 418
03 Nov 2016 01:05 PM
ancors... lol sorry
Report Abuse
LonlyWolf1 is not online. LonlyWolf1
Joined: 26 May 2010
Total Posts: 381
03 Nov 2016 02:26 PM
@synzoxre13

The block unancor but the wedges stay ancored
Report Abuse
LonlyWolf1 is not online. LonlyWolf1
Joined: 26 May 2010
Total Posts: 381
03 Nov 2016 02:36 PM
oh and another problem with this script, the part in witch the script is in disapears. Its like it gets removed and therfore it cant restore back to normal.
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