Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sit = false
- function Sit2(bool_Sit,Target)
- local torso = Target.Torso
- if bool_Sit==true then
- torso["Right Hip"].C0 = CFrame.new(1,-1,0) * CFrame.fromOrientation(math.rad(0),math.rad(75),math.rad(90))
- torso["Left Hip"].C0 = CFrame.new(-1,-1,0) * CFrame.fromOrientation(math.rad(0),math.rad(-75),math.rad(-90))
- local folder = Instance.new("Folder",Target)
- folder.Name = "SitTest"
- local partr = Instance.new("Part",folder)
- partr.Position = Vector3.new(0,-5,0)
- local at3pr = Instance.new("Attachment",partr)
- local ao = Instance.new("AlignOrientation",torso)
- ao.Attachment0 = torso.NeckAttachment
- ao.Attachment1 = at3pr
- ao.PrimaryAxisOnly = true
- ao.RigidityEnabled = true
- character.Humanoid.PlatformStand = true
- else
- torso["Right Hip"].C0 = CFrame.new(1,-1,0) * CFrame.fromOrientation(math.rad(0),math.rad(90),math.rad(0))
- torso["Left Hip"].C0 = CFrame.new(-1,-1,0) * CFrame.fromOrientation(math.rad(0),math.rad(-90),math.rad(0))
- character.Humanoid.PlatformStand = false
- if character:FindFirstChild("SitTest") then
- character:FindFirstChild("SitTest"):Destroy()
- end
- if character:FindFirstChildWhichIsA("AlignOrientation",true) then
- character:FindFirstChildWhichIsA("AlignOrientation",true):Destroy()
- end
- end
- end
Add Comment
Please, Sign In to add comment