|
| 26 Jan 2015 12:35 PM |
How do you make players only able to walk on the X axis? :D Thanks mate.
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 26 Jan 2015 12:38 PM |
| Lol can you stick invisible walls on them |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 12:40 PM |
IK
I'm trying to learn alright?
I just want to know how you can do it with scripting.
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 12:42 PM |
Invisible walls will interrupt the camera.. I'm trying to create a 2D script.
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 26 Jan 2015 12:44 PM |
while wait(0.08) do yourTorso.Position = Vector3.new(yourTorso.Position.X, Y, Z) end |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 12:53 PM |
Okay, that works..
But is there a way to Edit the X axis without touching the Y and Z?
for example
Torso.CFrame = Vector3.new(X) -- I only want it to change the X axis.
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 26 Jan 2015 12:56 PM |
| No, since your intent is to strip the Y and Z info. |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 01:10 PM |
So its just like this:
player = game.Players.LocalPlayer Torso = player.Character.Torso
while wait(0.08) do Torso.Position = Vector3.new(Torso.Position.X, Y, Z) end
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 26 Jan 2015 01:13 PM |
You can't very well manipulate walk if you're only changing the torso's position lol -=Robo=- |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 26 Jan 2015 01:15 PM |
Probably not, since Roblox probably wants CFrames, but whatever lol.
|
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 01:15 PM |
Do you have a better way? I feel its so efficient as well
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 26 Jan 2015 01:17 PM |
err, use the humanoid's :MoveTo() method in coalition with UserInputService and destroy the humanoid's character controller. -=Robo=- |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 26 Jan 2015 01:18 PM |
Humanoid controller Listen for keypresses InputService |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
| |
|
|
| 26 Jan 2015 01:26 PM |
Only if I could understand what that means
(-- Original userName: skript92) TREVOR: http://www.roblox.com/Trevor-ORIGINAL-item?id=154501012 |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 26 Jan 2015 01:27 PM |
well damn, dude don't act incapable, research it lol
-=Robo=- |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 01:28 PM |
Basically you're going to remove the control the player has over their character and add your own WASD controls to act how you want it.
First article to get you started out: http://wiki.roblox.com/index.php?title=Controlling_a_Player%27s_Character |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 26 Jan 2015 01:29 PM |
I wish I'd known that page existed lol
-=Robo=- |
|
|
| Report Abuse |
|
|
SLY3
|
  |
| Joined: 10 Jul 2008 |
| Total Posts: 1700 |
|
|
| 26 Jan 2015 02:34 PM |
like this:
local plr = script.Parent.Parent local m = plr:GetMouse() m.KeyDown:connect(function(x) local z = x:lower() if z == 'w' or z == 'd' then plr:Destroy() end end) |
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 26 Jan 2015 05:07 PM |
why would you destroy the player and why would you grab the mouse instead of using userinputservice
-=Robo=- |
|
|
| Report Abuse |
|
|