Exzeption
|
  |
| Joined: 01 Nov 2011 |
| Total Posts: 1312 |
|
|
| 29 Jul 2015 03:00 PM |
Trying to figure out how to make a part go down when it's touched.
gate.Touched:connect(function(hit) if hit.Parent.ClassName == "Hat" then return end if debounce == false then debounce = true local plrname = hit.Parent.Name name.Name = plrname.."'s Tycoon" while true do wait(.01) gate.CFrame = CFrame.new(gate.CFrame.x, gate.CFrame.y - .1, gate.CFrame.z) gate.Rotation = rotation end end end)
So you touch it, and the gate goes above the part on top of it, how do I actually make it go down? |
|
|
| Report Abuse |
|
|
Exzeption
|
  |
| Joined: 01 Nov 2011 |
| Total Posts: 1312 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 29 Jul 2015 03:12 PM |
| 'gate.Rotation = rotation' is causing the problem. |
|
|
| Report Abuse |
|
|
Exzeption
|
  |
| Joined: 01 Nov 2011 |
| Total Posts: 1312 |
|
|
| 29 Jul 2015 03:19 PM |
| Before I did that the rotation went back to 0, I need it to work for all angles |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 29 Jul 2015 03:27 PM |
Do this instead:
gate.CFrame = gate.CFrame + Vector3.new(0, -.1, 0) |
|
|
| Report Abuse |
|
|