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: Animation Script

Previous Thread :: Next Thread 
drc3 is not online. drc3
Joined: 14 Aug 2009
Total Posts: 1284
15 Nov 2015 09:23 AM
This is an animation script I have been using but recently it started doing something weird. The characters start getting stuck in the ground instead of standing on it. I have looked over this like 1000 times but I can not see why it is happening. Perhaps a more skilled scripter could help me? Please? Sorry about the length.

wait(0.1)

Character = script.Parent
Humanoid = Character.Humanoid

--

Position = Instance.new("BodyPosition")
Position.maxForce = Vector3.new(0, 0, 0)
Position.position = Vector3.new(0, 0, 0)

Gyro = Instance.new("BodyGyro")
Gyro.maxTorque = Vector3.new(0, 0, 0)

Velocity = Instance.new("BodyVelocity")
Velocity.maxForce = Vector3.new(0, 0, 0)

--

KunaiOBJ = Instance.new("Part")
KunaiOBJ.Locked = true
KunaiOBJ.Name = "Kunai"
KunaiOBJ.TopSurface = "Smooth"
KunaiOBJ.BottomSurface = "Smooth"
KunaiOBJ.formFactor = "Custom"
KunaiOBJ.Size = Vector3.new(1, 1, 1)
KunaiMesh = Instance.new("SpecialMesh")
KunaiMesh.Parent = KunaiOBJ
KunaiMesh.MeshType = "FileMesh"
KunaiMesh.MeshId = "http://www.roblox.com/asset/?id=45728702"
KunaiMesh.TextureId = "http://www.roblox.com/asset/?id=45728877"
KunaiMesh.VertexColor = Vector3.new(1, 1, 1)
KunaiMesh.Scale = Vector3.new(1.5, 1.5, 1.5)

Shuriken = Instance.new("Part")
Shuriken.Locked = true
Shuriken.Name = "Shuriken"
Shuriken.TopSurface = "Smooth"
Shuriken.BottomSurface = "Smooth"
Shuriken.formFactor = "Custom"
Shuriken.Size = Vector3.new(1, 0.4, 1)
Shuriken.Reflectance = 0.1
Shuriken.BrickColor = BrickColor.new("Dark stone grey")
ShurikenMesh = Instance.new("SpecialMesh")
ShurikenMesh.Parent = Shuriken
ShurikenMesh.MeshType = "FileMesh"
ShurikenMesh.MeshId = "http://www.roblox.com/asset/?id=11376946"
ShurikenMesh.TextureId = ""
ShurikenMesh.VertexColor = Vector3.new(1, 1, 1)
ShurikenMesh.Scale = Vector3.new(1.5, 2, 1.5)
ShurikenGyro = Instance.new("BodyGyro")
ShurikenGyro.Parent = Shuriken
ShurikenGyro.D = 50
ShurikenGyro.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
ShurikenVelocity = Instance.new("BodyVelocity")
ShurikenVelocity.Parent = Shuriken
ShurikenVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
SpinEffect = Instance.new("Part")
SpinEffect.Locked = true
SpinEffect.Name = "Spin Effect"
SpinEffect.TopSurface = "Smooth"
SpinEffect.BottomSurface = "Smooth"
SpinEffect.formFactor = "Custom"
SpinEffect.Size = Vector3.new(0.2, 0.2, 0.2)
SpinEffect.BrickColor = BrickColor.new("Dark stone grey")
SpinEffect.Transparency = 0.5
SpinEffect.Parent = Shuriken
SpinMesh = Instance.new("CylinderMesh")
SpinMesh.Parent = SpinEffect
SpinMesh.Scale = Vector3.new(4, 0.2, 4)
SpinWeld = Instance.new("Weld")
SpinWeld.Parent = Shuriken
SpinWeld.Part0 = Shuriken
SpinWeld.Part1 = SpinEffect
SpinWeld.C0 = CFrame.new(0, 0, 0)

FuumaShuriken = Instance.new("Part")
FuumaShuriken.Locked = true
FuumaShuriken.Anchored = false
FuumaShuriken.CanCollide = false
FuumaShuriken.Name = "FuumaShuriken"
FuumaShuriken.TopSurface = "Smooth"
FuumaShuriken.BottomSurface = "Smooth"
FuumaShuriken.formFactor = "Custom"
FuumaShuriken.Size = Vector3.new(3, 0.5, 3)
FuumaShuriken.Reflectance = 0.05
FuumaShuriken.BrickColor = BrickColor.new(26)
FuumaShurikenMesh = Instance.new("SpecialMesh")
FuumaShurikenMesh.Parent = FuumaShuriken
FuumaShurikenMesh.MeshType = "FileMesh"
FuumaShurikenMesh.MeshId = "http://www.roblox.com/asset/?id=11376946"
FuumaShurikenMesh.Scale = Vector3.new(8, 8, 8)

local PTorso = Character["PTorso"]
local PNeck = Character["PNeck"]
local PHead = Character["PHead"]
local PRightShoulder = Character["PRightShoulder"]
local PLeftShoulder = Character["PLeftShoulder"]
local PRightBicep = Character["PRightBicep"]
local PLeftBicep = Character["PLeftBicep"]
local PHips = Character["PHips"]
local PRightLeg = Character["PRightLeg"]
local PLeftLeg = Character["PLeftLeg"]
local PRightShin = Character["PRightShin"]
local PLeftShin = Character["PLeftShin"]
local PRightFoot = Character["PRightFoot"]
local PLeftFoot = Character["PLeftFoot"]
local PRightHand = Character["PRightHand"]
local PLeftHand = Character["PLeftHand"]

local Torso = Character.Torso["PTorso"]
local Neck = PTorso["PNeck"]
local Head = PNeck["PHead"]
local RightShoulder = PTorso["PRightShoulder"]
local LeftShoulder = PTorso["PLeftShoulder"]
local RightBicep = PRightShoulder["PRightBicep"]
local LeftBicep = PLeftShoulder["PLeftBicep"]
local Hips = PTorso["PHips"]
local RightLeg = PHips["PRightLeg"]
local LeftLeg = PHips["PLeftLeg"]
local RightShin = PRightLeg["PRightShin"]
local LeftShin = PLeftLeg["PLeftShin"]
local RightFoot = PRightShin["PRightFoot"]
local LeftFoot = PLeftShin["PLeftFoot"]
local RightHand = PRightBicep["PRightHand"]
local LeftHand = PLeftBicep["PLeftHand"]

TorsoC0 = CFrame.new(0, 1, 0)
NeckC0 = CFrame.new(0, 1, 0)
HeadC0 = CFrame.new(0, 0.5, 0)
RightShoulderC0 = CFrame.new(0.85, -0.1, 0)*CFrame.Angles(0, 1.57, 0)
RightBicepC0 = CFrame.new(0, -0.6, 0)
LeftShoulderC0 = CFrame.new(-0.85, -0.1, 0)*CFrame.Angles(0, -1.57, 0)
LeftBicepC0 = CFrame.new(0, -0.6, 0)
LeftHandC0 = CFrame.new(0, -0.45, 0)
RightHandC0 = CFrame.new(0, -0.45, 0)
HipsC0 = CFrame.new(0, -0.35, 0)
RightLegC0 = CFrame.new(0.3, -0.6, 0)
RightShinC0 = CFrame.new(0, -0.44, 0)
LeftLegC0 = CFrame.new(-0.3, -0.6, 0)
LeftShinC0 = CFrame.new(0, -0.44, 0)
RightFootC0 = CFrame.new(0, -0.35, -0.1)
LeftFootC0 = CFrame.new(0, -0.35, -0.1)

function RefreshWelds()
Torso.C0 = TorsoC0
Neck.C0 = NeckC0
Head.C0 = HeadC0
RightShoulder.C0 = RightShoulderC0
RightBicep.C0 = RightBicepC0
LeftShoulder.C0 = LeftShoulderC0
LeftBicep.C0 = LeftBicepC0
Hips.C0 = HipsC0
RightLeg.C0 = RightLegC0
RightShin.C0 = RightShinC0
RightFoot.C0 = RightFootC0
LeftLeg.C0 = LeftLegC0
LeftShin.C0 = LeftShinC0
LeftFoot.C0 = LeftFootC0
RightHand.C0 = RightHandC0
LeftHand.C0 = LeftHandC0
end

function ChakraWelds()
Head.C0 = HeadC0 * CFrame.Angles(0.3, 0, 0)
Neck.C0 = NeckC0
--
Torso.C0 = TorsoC0 * CFrame.Angles(-0.4, 0, 0) * CFrame.new(0, -0.2, -0.2)
Hips.C0 = HipsC0 * CFrame.Angles(0.5, 0, 0) * CFrame.new(0, -0.1, 0.2)
--
RightShoulder.C0 = RightShoulderC0*CFrame.new(0.4, 0.25, 0) * CFrame.Angles(-1.2, 0, 1.4)
LeftShoulder.C0 = LeftShoulderC0*CFrame.new(-0.4, 0.25, 0) * CFrame.Angles(-1.2, 0, -1.4)
--
RightBicep.C0 = RightBicepC0* CFrame.Angles(0, 0, 1)
LeftBicep.C0 = LeftBicepC0* CFrame.Angles(0, 0, -1)
--
RightLeg.C0 = RightLegC0 * CFrame.Angles(0.1, 0, 0.75)
LeftLeg.C0 = LeftLegC0 * CFrame.Angles(0.9, 0.3, -0.5)
--
RightShin.C0 = RightShinC0*CFrame.new(0, -0.1, 0) * CFrame.Angles(-0.7, 0, -0.25)
LeftShin.C0 = LeftShinC0*CFrame.new(0, -0.1, 0) * CFrame.Angles(-1.2, 0, -0.1)
--
RightFoot.C0 = RightFootC0 * CFrame.Angles(0.1, 0, -0.1)
LeftFoot.C0 = LeftFootC0 * CFrame.Angles(0.2, 0, 0)
--
RightHand.C0 = RightHandC0 * CFrame.Angles(-1, 0, 0)*CFrame.new(0, 0, -0.075)
LeftHand.C0 = LeftHandC0 * CFrame.Angles(-1, 0, 0)*CFrame.new(0, 0, -0.075)
end

function Stance()
Head.C0 = HeadC0 * CFrame.Angles(0.3, 0, 0)
--
Torso.C0 = TorsoC0 * CFrame.Angles(-0.4, 0, 0) * CFrame.new(0, -0.2, -0.2)
Hips.C0 = HipsC0 * CFrame.Angles(0.5, 0, 0) * CFrame.new(0, -0.1, 0.2)
--
RightShoulder.C0 = RightShoulderC0*CFrame.new(-0.3, 0.1, 0.1) * CFrame.Angles(-0.5, 0, -0.7)
LeftShoulder.C0 = LeftShoulderC0*CFrame.new(-0.3, 0.1, 0.1) * CFrame.Angles(-0.5, 0, -0.7)
--
RightBicep.C0 = RightBicepC0* CFrame.Angles(0, 0, 1)
LeftBicep.C0 = LeftBicepC0* CFrame.Angles(0, 0, -0.9)
--
RightLeg.C0 = RightLegC0 * CFrame.Angles(0.1, 0, 0.75)
LeftLeg.C0 = LeftLegC0 * CFrame.Angles(0.9, 0.3, -0.5)
--
RightShin.C0 = RightShinC0*CFrame.new(0, -0.1, 0) * CFrame.Angles(-0.7, 0, -0.25)
LeftShin.C0 = LeftShinC0*CFrame.new(0, -0.1, 0) * CFrame.Angles(-1.2, 0, -0.1)
--
RightFoot.C0 = RightFootC0 * CFrame.Angles(0.1, 0, -0.1)
LeftFoot.C0 = LeftFootC0 * CFrame.Angles(0.2, 0, 0)
end

RefreshWelds()
RightShoulder.C0 = RightShoulderC0*CFrame.new(0, 0.5, 0.5) * CFrame.Angles(-1.57, 0, 0)
LeftShoulder.C0 = LeftShoulderC0*CFrame.new(0, 0.5, 0.5) * CFrame.Angles(-1.57, 0, 0)
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
15 Nov 2015 09:29 AM
I think you're on your own this time, sorry!
Report Abuse
drc3 is not online. drc3
Joined: 14 Aug 2009
Total Posts: 1284
15 Nov 2015 09:50 AM
Hahaha ok well maybe someone will know? I'm pretty sure it is the part of the script dealing with stance if that helps narrow it down.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
15 Nov 2015 09:54 AM
too long & messy ._.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
15 Nov 2015 09:54 AM
messy

--> walls of text
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
15 Nov 2015 10:07 AM
tl;dr


Dogemon, gotta pet them all!
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
15 Nov 2015 11:01 AM
Here, let me help you debug your code;

Add a couple of prints every couple lines of code.
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