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: How do you make players only able to walk on the X axis?

Previous Thread :: Next Thread 
Born2Script is not online. Born2Script
Joined: 23 Jul 2013
Total Posts: 2670
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 is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
26 Jan 2015 12:38 PM
Lol can you stick invisible walls on them
Report Abuse
Born2Script is not online. Born2Script
Joined: 23 Jul 2013
Total Posts: 2670
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
Born2Script is not online. Born2Script
Joined: 23 Jul 2013
Total Posts: 2670
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 is not online. 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
Born2Script is not online. Born2Script
Joined: 23 Jul 2013
Total Posts: 2670
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 is not online. 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
Born2Script is not online. Born2Script
Joined: 23 Jul 2013
Total Posts: 2670
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 is not online. 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 is not online. 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
Born2Script is not online. Born2Script
Joined: 23 Jul 2013
Total Posts: 2670
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 is not online. 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 is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
26 Jan 2015 01:18 PM
Humanoid controller
Listen for keypresses
InputService
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
26 Jan 2015 01:22 PM
yeah that

-=Robo=-
Report Abuse
Born2Script is not online. Born2Script
Joined: 23 Jul 2013
Total Posts: 2670
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 is not online. 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
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
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 is not online. 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 is not online. 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 is not online. 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
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