|
| 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 |
|
|
| 15 Oct 2014 03:14 PM |
| Make sure your vector is 1.0 1.0 1.0 check the unit. |
|
|
| Report Abuse |
|