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: Sticky Brick

Previous Thread :: Next Thread 
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
04 Dec 2013 07:50 PM
I'm trying to create a brick that when sliding on ice, you hit it and it doesn't make you bounce back but it stops you on the tile you are on. But after you hit it, you can freely move. You may be thinking that this is what bricks do but you are wrong. I'm developing a simple ice puzzle game ( Got the idea from the 7th Gym in Pokemon Platinum ) and I have 3 different tiles that make putting a level together extremely simple. The 3 tiles are an ice tile, what you slide on, a snow tile, flat like an ice tile but snow, and a snow boulder tile, a large sphere with a transparent brick surrounding it to stop a player. Whenever you slide into the brick, it bounces you back but I want to prevent this from happening. Changing the elasticity and such isn't working so I figured a script would.

Would I do something like creating a wield onTouch and then destroying the wielding after half of a second? Please help.
Report Abuse
MightyWanderer is not online. MightyWanderer
Joined: 17 Jan 2011
Total Posts: 1110
04 Dec 2013 07:55 PM
I don't know if this would work but...

script.Parent.Touched:connect(function(hit)
t = hit.Parent:FindFirstChild("Torso")
t.Anchored = true
wait(0.1)
t.Anchored = false
end)

Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
04 Dec 2013 07:57 PM
Just change the velocity of each part in the player to Vector3.new(0,0,0). Anchoring the player won't remove their starting velocity when they were anchored and they will continue to move when unanchored.
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
04 Dec 2013 08:00 PM
How do I do that? Cause the other one didn't work.
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
04 Dec 2013 08:06 PM
Each brick has a property called "Velocity" which is a Vector3 value. cycle through all of the children in the character and if it is a part, change the velocity to Vector3.new(0,0,0).

On a side note: Know that you have to want to learn how to script rather than wanting the outcome of scripting. Do a little research and see how to do this -- you should at least know how to change properties before attempting to script. When you just get people to give you code, you don't learn. If you just want the outcome of scripting, that's perfectly fine, but know that you'll never be able to script anything complex.
Report Abuse
MightyWanderer is not online. MightyWanderer
Joined: 17 Jan 2011
Total Posts: 1110
04 Dec 2013 08:07 PM
Ohh, that makes a lot more sense. Thanks.

Report Abuse
cxcharlie is not online. cxcharlie
Joined: 26 Aug 2009
Total Posts: 1414
04 Dec 2013 08:54 PM
just use welds...
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
05 Dec 2013 02:14 PM
I know how to change properties and do everything in workspace except scripting. The problem is that changing the properties did no work.
Report Abuse
ruraltechdeck101 is not online. ruraltechdeck101
Joined: 24 Dec 2009
Total Posts: 3850
05 Dec 2013 02:15 PM
not*
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