Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Moving the character model linearly?

In many fighting games on roblox, classes usually have methods of mobility that would break the normal bounds of roblox physics. (Eg, dashing forward in a straight line. or Jumping in a perfect U shape, etc.) Examples being games such as Elemental Battlegrounds Maybe they're using body forces? https://gyazo.com/1cbca68d8e49b8d9db808be21c20d69d https://gyazo.com/ca216aef9235b63d95febe3d756aa92f but in games like Black Magic, Strife, Critical Strike https://gyazo.com/ea534293ebcdb88f84f53baa8818696e (Gyazo Machine Broke) many of the characters seem like their moves aren't possible with body forces and Animation Editor Animations...?

Especially considering when I look at codes from free model classes such as these I see large chunks of code that look something along the lines of this.

local AnimSpeed = .4
				HWeld.C0=clerp(HWeld.C0,Cf(0,-1,0)*Euler(rad(0),0,0), AnimSpeed)
				HWeld.C1=clerp(HWeld.C1,Cf(0,0,0)*Euler(0,0,0), AnimSpeed)
				WepWeld.C0=clerp(WepWeld.C0,Cf(0,0,0)*Euler(rad(-90),0,0), AnimSpeed)
				WepWeld.C1=clerp(WepWeld.C1,Cf(0,0,0)*Euler(0,rad(0),0), AnimSpeed) 
				FRightShoulder.C0=clerp(FRightShoulder.C0,Cf(1.5,0.5,0)*Euler(0,0,rad(80)), AnimSpeed)
				FRightShoulder.C1=clerp(FRightShoulder.C1,Cf(0,0.5,0)*Euler(rad(-10),0,0), AnimSpeed)
				FLeftShoulder.C0=clerp(FLeftShoulder.C0,Cf(-1.5,0.5,-.1)*Euler(rad(-30),0,rad(-25)), AnimSpeed)
				FLeftShoulder.C1=clerp(FLeftShoulder.C1,Cf(0,0.5,0)*Euler(0,0,0), AnimSpeed)
				Neck.C0=clerp(Neck.C0,NNC0 *Euler(0,0,rad(30)), AnimSpeed)
				Neck.C1=clerp(Neck.C1,NNC1 *Euler(0,0,0), AnimSpeed)
				FRootJoint.C0=clerp(FRootJoint.C0,Cf(0,-1.2,0)*Euler(rad(-20),rad(-30),0), AnimSpeed)
				FRootJoint.C1=clerp(FRootJoint.C1,Cf(0,-1,0)*Euler(0,0,0), AnimSpeed)
				FRightHip.C0=clerp(FRightHip.C0,Cf(1.5,-1,0)*Euler(rad(-20),rad(-10),rad(10)), AnimSpeed)
				FRightHip.C1=clerp(FRightHip.C1,Cf(1,1,0)*Euler(0,0,0), AnimSpeed)
				FLeftHip.C0=clerp(FLeftHip.C0,Cf(-1.5,-.6,0)*Euler(rad(16),rad(30),rad(-10)), AnimSpeed)
				FLeftHip.C1=clerp(FLeftHip.C1,Cf(-1,1,0)*Euler(0,0,0), AnimSpeed)

Any Ideas?

1 answer

Character:SetPrimaryPartCFrame(Character.PrimaryPart.CFrame+Vector3.new(1,2,3))

Just add a vector onto the characters HRP

This discussion is preserved as it was. New answers, comments, and votes are closed.