null nil RBX1 0 0 0 0 1 0 0 0 1 0 0 0 1 Workspace null true -0.5 0.5 0 0 -0.5 0.5 0 0 37 5 0.200000003 -2 1 0 0 0 1 0 0 0 1 true 0.5 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 true 256 Base 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0 0 0 0 2 1 508 0.400000006 512 null 0 85.4188309 20.0802441 92.8921356 0.221595421 -0.387207836 0.894966781 -0 0.917784214 0.397079736 -0.975138783 -0.0879910514 0.20337674 70 67.5194931 12.138648 88.8246002 1 0 0 0 1 0 0 0 1 Instance true true -0.5 0.5 0 0 -0.5 0.5 4 0 194 -2 126 -2 1 0 0 0 1 0 0 0 1 true 0.5 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 true 256 Terrain 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0 0 0 0 2044 252 2044 watrbx.wtf 0 0 0 1 0 0 0 1 0 0 0 1 BuilderMan null false -0.5 0.5 0 0 -0.5 0.5 4 0 226 59.4832916 4.8153162 90.9891281 0.0853810087 0 0.996348381 0 1 0 -0.996348381 0 0.0853810087 false 0.5 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 true 256 Head 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 0 0 0 -11.3137083 0 11.3137093 0 1 2 1 1 2 2 0 Mesh 0 0 0 1.25 1.25 1.25 1 1 1 5 face 20 0 rbxasset://textures/face.png 0 false -0.5 0.5 0 0 -0.5 0.5 4 0 24 59.4832916 3.31531644 90.9891281 0.0853810087 0 0.996348381 -0 1 -0 -0.996348381 0 0.0853810087 false 0.5 0.300000012 -0.5 0.5 0 0 0 0 2 0 true 256 Torso 0 0 0 2 0 0 0 0 -0.5 0.5 3 0 0 -11.3137083 0 11.3137093 0 1 2 2 1 5 roblox 20 0 http://www.roblox.com/asset/?version=1&id=1000024 0 1 0.5 0 0 0 1 0 1 0 -1 -0 -0 -0.5 0.5 0 0 0 1 0 1 0 -1 -0 -0 -0.0427663997 0.150000006 Right Shoulder null null watrbx.wtf -1 0.5 0 -0 -0 -1 0 1 0 1 0 0 0.5 0.5 0 -0 -0 -1 0 1 0 1 0 0 -0.0427663997 0.150000006 Left Shoulder null null 1 -1 0 0 0 1 0 1 0 -1 -0 -0 0.5 1 0 0 0 1 0 1 0 -1 -0 -0 0.0427663997 0.100000001 Right Hip null null -1 -1 0 -0 -0 -1 0 1 0 1 0 0 -0.5 1 0 -0 -0 -1 0 1 0 1 0 0 0.0427663997 0.100000001 Left Hip null null 0 1 0 -1 -0 -0 0 0 1 0 1 0 0 -0.5 0 -1 -0 -0 0 0 1 0 1 0 Neck null null false -0.5 0.5 0 0 -0.5 0.5 4 0 24 59.3552208 3.31531644 92.4836502 0.0853810087 0 0.996348381 0 1 0 -0.996348381 0 0.0853810087 false 0.5 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 true 256 Left Arm 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0 -11.3137083 0 11.3137093 0 1 1 2 1 false -0.5 0.5 0 0 -0.5 0.5 4 0 24 59.6113625 3.31531644 89.494606 0.0853810087 0 0.996348381 0 1 0 -0.996348381 0 0.0853810087 false 0.5 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 true 256 Right Arm 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0 -11.3137083 0 11.3137093 0 1 1 2 1 false -0.5 0.5 0 0 -0.5 0.5 0 0 24 59.4406013 1.31531644 91.4873047 0.0853810087 0 0.996348381 0 1 0 -0.996348381 0 0.0853810087 false 0.5 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 true 256 Left Leg 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0 -11.3137083 0 11.3137093 0 1 1 2 1 false -0.5 0.5 0 0 -0.5 0.5 0 0 24 59.5259819 1.31531644 90.4909515 0.0853810087 0 0.996348381 0 1 0 -0.996348381 0 0.0853810087 false 0.5 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 true 256 Right Leg 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0 -11.3137083 0 11.3137093 0 1 1 2 1 100 100 Humanoid 0 16 http://www.roblox.com/asset/?version=1&id=1000024 Shirt Graphic 226 24 24 Body Colors 24 24 24 true Zombie function waitForChild(parent, childName) while true do local child = parent:findFirstChild(childName) if child then return child end parent.ChildAdded:wait() end end function visit(item, f) for _, v in ipairs(item:GetChildren()) do f(v) visit(v, f) end end -- declarations local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Humanoid") local pose = "Standing" -- findBase local base visit(game, function (i) if i.Name == "Base" then base = i end end ) function move(time) intTime = math.floor(time) cycle = intTime % 4 dx = 2 * math.floor(cycle/2) - 1 dz = 2 * math.floor(cycle % 2) - 1 delta = Vector3.new(dx*100, 0, dz*100) point = Torso.Position + delta Humanoid:MoveTo(point, base) end -- main program local nextTime = 0 local runService = game:service("RunService"); while Figure.Parent~=nil do time = runService.Stepped:wait() if time > nextTime then move(time) nextTime = time + 0.5 end end true Script local char = game.Workspace.BuilderMan local charStart = char.Torso.CFrame local testService = game:GetService("TestService") local charMovementThreshold = 3 -- more than 3 studs means char was knocked down local sizes = {Small = Vector3.new(1, 1, 1), Medium = Vector3.new(3, 3, 3), Large = Vector3.new(8, 8, 8)} local speeds = {Slow = 20, Medium = 35, Fast = 60} local directions = {Front = Vector3.new(0, 0, -1), Back = Vector3.new(0, 0, 1), Above = Vector3.new(0, 1, 0), Side = Vector3.new(1, 0, 0)} local shapes = {Ball = "Ball"} local targets = {Centered = char.Torso.CFrame, Glancing = char["Right Arm"].CFrame} local expectedTestResults = {} expectedTestResults["Fast"] = {Small = false, Medium = true, Large = true} expectedTestResults["Slow"] = {Small = false, Medium = false, Large = true} expectedTestResults["Medium"] = {Small = false, Medium = false, Large = true} local boulder = Instance.new("Part") boulder.formFactor = "Custom" boulder.CanCollide = true boulder.Anchored = false function charHasMoved(char, armStart, torsoStart) return ((char.Torso.CFrame.p - torsoStart).magnitude > charMovementThreshold) or ((char["Right Arm"].CFrame.p - armStart).magnitude > charMovementThreshold) end function testBoulder(rock, char) char.Torso.CFrame = charStart local charArmStart = char["Right Arm"].CFrame.p local charTorsoStart = char.Torso.CFrame.p wait(2) rock.Parent = game.Workspace --wait(5) -- should be more than enough for each test to complete local wasRagdoll = false local armMovementTotal = 0 local torsoMovementTotal = 0 for i = 0, 5, .5 do --wasRagdoll = wasRagdoll or char.Humanoid.Ragdoll --wasRagdoll = wasRagdoll or charHasMoved(char, charArmStart, charTorsoStart) armMovementTotal = armMovementTotal + (char["Right Arm"].CFrame.p - charArmStart).magnitude charArmStart = char["Right Arm"].CFrame.p torsoMovementTotal = torsoMovementTotal + (char.Torso.CFrame.p - charTorsoStart).magnitude charTorsoStart = char.Torso.CFrame.p wait(.5) end rock.Parent = nil -- return ((char.Torso.CFrame.p - charStart.p).magnitude > charTorsoMovementThreshold) --return wasRagdoll return (torsoMovementTotal > charMovementThreshold) or (armMovementTotal > charMovementThreshold) end -- test EVERYTHING for targetName, target in pairs(targets) do for shapeName, shape in pairs(shapes) do for sizeName, size in pairs(sizes) do for speedName, speed in pairs(speeds) do for directionName, direction in pairs(directions) do local relativeDirection = charStart:vectorToWorldSpace(direction) boulder.Shape = shape boulder.Size = size boulder.CFrame = CFrame.new(target.p + relativeDirection * boulder.Size.magnitude * 2 + Vector3.new(0, boulder.Size.Y/2, 0)) boulder.Velocity = -relativeDirection * speed boulder.RotVelocity = Vector3.new(0, 0, 0) local testName = speedName .. " " .. sizeName .. " " .. shapeName .. " " .. targetName .. " " .. directionName .. " ragdoll test" local expectedResultsForSpeed = expectedTestResults[speedName] local expectedResult = expectedResultsForSpeed[sizeName] if directionName == "Above" and sizeName ~= "Large" then expectedResult = false end local actualResult = testBoulder(boulder, char) print(testName .. ": ", actualResult, " expected ", expectedResult) --testService:Check(actualResult == expectedResult, testName) end end end end end StarterPack false 2 HopperBin rbxasset://Textures/Grab.png false 4 HopperBin rbxasset://Textures/Hammer.png false 3 HopperBin rbxasset://Textures/Clone.png StarterGui true 0 10 1 SoundService 1 CollectionService PhysicsService BadgeService Geometry RenderHooksService SocialService 1000 Debris Instance Instance CookiesService Teleport Service true Players Selection 4286874756 1 4278190080 4278190080 4290822336 100000 0 41.7332993 Lighting 4290230204 14:00:00 ChangeHistoryService true true true true TestService 800 false Script local char = game.Workspace.BuilderMan local charStart = char.Torso.CFrame local testService = game:GetService("TestService") --local charMovementThreshold = 3 -- more than 3 studs means char was knocked down local charMovementThreshold = 1 local sizes = {Small = Vector3.new(1, 1, 1), Medium = Vector3.new(3, 3, 3), Large = Vector3.new(8, 8, 8)} local speeds = {Slow = 20, Fast = 80} --local directions = {Front = Vector3.new(0, 0, -1), Back = Vector3.new(0, 0, 1), Above = Vector3.new(0, 1, 0), Side = Vector3.new(1, 0, 0)} local directions = {Front = Vector3.new(0, 0, -1), Back = Vector3.new(0, 0, 1), Side = Vector3.new(1, 0, 0)} local shapes = {Ball = "Ball"} local targets = {Centered = char.Torso.CFrame, Glancing = char["Right Arm"].CFrame} local expectedTestResults = {} expectedTestResults["Fast"] = {Small = false, Medium = true, Large = true} expectedTestResults["Slow"] = {Small = false, Medium = false, Large = false} --expectedTestResults["Medium"] = {Small = false, Medium = false, Large = true} local boulder = Instance.new("Part") boulder.formFactor = "Custom" boulder.CanCollide = true boulder.Anchored = false function charHasMoved(char, armStart, torsoStart) return ((char.Torso.CFrame.p - torsoStart).magnitude > charMovementThreshold) or ((char["Right Arm"].CFrame.p - armStart).magnitude > charMovementThreshold) end function testBoulder(rock, char) char.Torso.CFrame = charStart --local charArmStart = char["Right Arm"].CFrame.p --local charTorsoStart = char.Torso.CFrame.p local charArmStart = char["Right Arm"].CFrame:vectorToWorldSpace(Vector3.new(1, 1, 1)) local charTorsoStart = char.Torso.CFrame:vectorToWorldSpace(Vector3.new(1, 1, 1)) char.Humanoid.Jump = true wait(2) rock.Parent = game.Workspace --wait(5) -- should be more than enough for each test to complete local wasRagdoll = false local armMovementTotal = 0 local torsoMovementTotal = 0 for i = 0, 5, .2 do --wasRagdoll = wasRagdoll or char.Humanoid.Ragdoll --wasRagdoll = wasRagdoll or charHasMoved(char, charArmStart, charTorsoStart) --armMovementTotal = armMovementTotal + (char["Right Arm"].CFrame.p - charArmStart).magnitude --charArmStart = char["Right Arm"].CFrame.p armMovementTotal = armMovementTotal + (char["Right Arm"].CFrame:vectorToWorldSpace(Vector3.new(1, 1, 1)) - charArmStart).magnitude charArmStart = char["Right Arm"].CFrame:vectorToWorldSpace(Vector3.new(1, 1, 1)) --torsoMovementTotal = torsoMovementTotal + (char.Torso.CFrame.p - charTorsoStart).magnitude --charTorsoStart = char.Torso.CFrame.p torsoMovementTotal = torsoMovementTotal + (char.Torso.CFrame:vectorToWorldSpace(Vector3.new(1, 1, 1)) - charTorsoStart).magnitude charTorsoStart = char.Torso.CFrame:vectorToWorldSpace(Vector3.new(1, 1, 1)) --wasRagdoll = wasRagdoll or char.Humanoid:IsRagdoll() wait(.2) end rock.Parent = nil -- return ((char.Torso.CFrame.p - charStart.p).magnitude > charTorsoMovementThreshold) --return wasRagdoll return (torsoMovementTotal > charMovementThreshold) or (armMovementTotal > charMovementThreshold) end -- test EVERYTHING for targetName, target in pairs(targets) do for shapeName, shape in pairs(shapes) do for sizeName, size in pairs(sizes) do for speedName, speed in pairs(speeds) do for directionName, direction in pairs(directions) do local relativeDirection = charStart:vectorToWorldSpace(direction) boulder.Shape = shape boulder.Size = size boulder.CFrame = CFrame.new(target.p + relativeDirection * (boulder.Size.X + 1) + Vector3.new(0, boulder.Size.Y/2, 0)) boulder.Velocity = -relativeDirection * speed boulder.RotVelocity = Vector3.new(0, 0, 0) local testName = speedName .. " " .. sizeName .. " " .. shapeName .. " " .. targetName .. " " .. directionName .. " ragdoll test" local expectedResultsForSpeed = expectedTestResults[speedName] local expectedResult = expectedResultsForSpeed[sizeName] if directionName == "Above" then expectedResult = false end local actualResult = testBoulder(boulder, char) print(testName .. ": ", actualResult, " expected ", expectedResult) testService:Check(actualResult == expectedResult, testName) end end end end end