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: Pseudo Char Movement

Previous Thread :: Next Thread 
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
15 Oct 2014 03:09 PM
I have this portion of my Walking script and for some reason, it always moves the char in the same diagonal direction for all different ways, I have no idea why.

if char.Settings.isWalking:FindFirstChild("W") then
local bf = Instance.new("BodyThrust")
bf.force = Vector3.new(5000,0,5000)
bf.location = Vector3.new(char.Body.CFrame * CFrame.new(-5,0.001,0))
bf.Parent = char.Body
game:GetService("Debris"):AddItem(bf,wait())
end
if char.Settings.isWalking:FindFirstChild("S") then
local bf = Instance.new("BodyThrust")
bf.force = Vector3.new(5000,0,5000)
bf.location = Vector3.new(char.Body.CFrame * CFrame.new(5,0.001,0))
bf.Parent = char.Body
game:GetService("Debris"):AddItem(bf,wait())
end
if char.Settings.isWalking:FindFirstChild("A") then
local bf = Instance.new("BodyThrust")
bf.force = Vector3.new(5000,0,5000)
bf.location = Vector3.new(char.Body.CFrame * CFrame.new(0,0.001,5))
bf.Parent = char.Body
game:GetService("Debris"):AddItem(bf,wait())
end
if char.Settings.isWalking:FindFirstChild("D") then
local bf = Instance.new("BodyThrust")
bf.force = Vector3.new(5000,0,5000)
bf.location = Vector3.new(char.Body.CFrame * CFrame.new(0,0.001,-5))
bf.Parent = char.Body
game:GetService("Debris"):AddItem(bf,wait())
end
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
15 Oct 2014 03:14 PM
Make sure your vector is 1.0 1.0 1.0 check the unit.
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