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: Replacing an object

Previous Thread :: Next Thread 
wabuilderman is not online. wabuilderman
Joined: 15 Jun 2013
Total Posts: 30
13 Apr 2015 02:04 PM
Ok, so I want to make a pane of glass, that when you touch it, shaters. I have modeled out what sharederd glass I want, and I have a normal pane. I went to make a script that would essentially move the normal pane away, and place in the shattered one. It comes up with the error: GlassShard1 is not a valid member of Model

Here is my code:

function OnTouched()
script.Parent.Position = Vector3.new(0,0,-3.5)
script.Parent.Parent.GlassShard1.Position = Vector3.new(0,0,-3.5)
end

script.Parent.Touched:connect(OnTouched)

The heiarchy looks like this:

-Glass
-GlassShard1
-GlassFull
-Script

What did I do wrong?
Report Abuse
wabuilderman is not online. wabuilderman
Joined: 15 Jun 2013
Total Posts: 30
13 Apr 2015 02:27 PM
*bumb*
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
13 Apr 2015 02:30 PM
You moved the fullglass to the same position?
Report Abuse
wabuilderman is not online. wabuilderman
Joined: 15 Jun 2013
Total Posts: 30
13 Apr 2015 03:30 PM
Yes, I did. Why?
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
13 Apr 2015 03:44 PM
You have to remove it and put the scattered plate there?

So the fullglass should move to somewhere else?
Report Abuse
wabuilderman is not online. wabuilderman
Joined: 15 Jun 2013
Total Posts: 30
13 Apr 2015 09:04 PM
Ok, just FYI I can move the full glass just fine. it is when I try to move the glass shard that the problem occurs. Can someone please help?
Report Abuse
wabuilderman is not online. wabuilderman
Joined: 15 Jun 2013
Total Posts: 30
14 Apr 2015 01:28 PM
*bump*
Report Abuse
wabuilderman is not online. wabuilderman
Joined: 15 Jun 2013
Total Posts: 30
14 Apr 2015 02:25 PM
Nvm, i changed it somehow and not it is just a matter of a group not having a positon.
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