TheMinid
|
  |
| Joined: 20 Jun 2012 |
| Total Posts: 128 |
|
|
| 14 Dec 2013 12:47 PM |
This script is meant to freeze players when touching a certain block, however I'm quite new to scripting, so I only came up with a little bit of the script. I need someone to help me with this.
Character.Walkspeed = 0 |
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 14 Dec 2013 12:49 PM |
Try learning about:
functions arguments events
Everything else you've got down. |
|
|
| Report Abuse |
|
|
|
| 14 Dec 2013 12:50 PM |
your close with the walkspeed thing, let me get the ball rolling some
isert this script into the freezing brick
function onTouched(hit) g = hit.Parent:findFirstChild("Humanoid") g.Walkspeed = 0 -- let me know if that works
|
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 14 Dec 2013 12:51 PM |
| ^ Add an end at the end, and a connection line. |
|
|
| Report Abuse |
|
|
TheMinid
|
  |
| Joined: 20 Jun 2012 |
| Total Posts: 128 |
|
|
| 14 Dec 2013 12:52 PM |
| Doesnt the g.Walkspeed=0 has an error. |
|
|
| Report Abuse |
|
|
|
| 14 Dec 2013 12:53 PM |
It's WalkSpeed, not Walkspeed. Just so you know.
~DrRandomous 'Nerd' |
|
|
| Report Abuse |
|
|
TheMinid
|
  |
| Joined: 20 Jun 2012 |
| Total Posts: 128 |
|
|
| 14 Dec 2013 12:57 PM |
| Still doesnt work, Ive tried everything. |
|
|
| Report Abuse |
|
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 14 Dec 2013 01:00 PM |
function onTouched(hit) g=hit.Parent:findFirstChild'Humanoid'; g.Character.Anchored=true; end;
lol |
|
|
| Report Abuse |
|
|
TheMinid
|
  |
| Joined: 20 Jun 2012 |
| Total Posts: 128 |
|
|
| 14 Dec 2013 01:04 PM |
| Still wont work, Maybe its something to do with cancollide being off? Because I'm trying to make a Cryogenic Chamber that freezes you, you fall through the floor and then unfreeze. |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 14 Dec 2013 01:12 PM |
hit.Torso.Anchored = true
or
hit.Animate.Disabled = true |
|
|
| Report Abuse |
|
|
|
| 14 Dec 2013 01:14 PM |
Omgzzz, here...
function Touched(part) local h = part.Parent:findFirstChild("Humanoid") if h ~= nil then h.WalkSpeed = 0 end end
script.Parent.Touched:connect(Touched) |
|
|
| Report Abuse |
|
|
TheMinid
|
  |
| Joined: 20 Jun 2012 |
| Total Posts: 128 |
|
|
| 14 Dec 2013 01:16 PM |
| Still wont work, I need one that works when CanCollide is turned off. |
|
|
| Report Abuse |
|
|
|
| 14 Dec 2013 01:33 PM |
Here. Try this:
function onTouch(hit) if hit.Name="Torso" or "Head" then -- Ensures that the -- thing that hit the brick is a player's body part. hit.Parent.Humanoid.Walkspeed=0 end script.Parent.Touched:connect(onTouch)
|
|
|
| Report Abuse |
|
|
TheMinid
|
  |
| Joined: 20 Jun 2012 |
| Total Posts: 128 |
|
|
| 14 Dec 2013 01:42 PM |
| Matt And Funchis worked. Thanks guys! Youve helped me hugely with my game! |
|
|
| Report Abuse |
|
|