In Minecraft, there’s a thing called ‘step-assist’ in some clients and mods that instead of making the player jump every block (part), they could instead just clip up to the next block…
Would it be possible to script such a thing in Roblox for when there’s a 3 stud jump, they will just clip upwards onto the edge of the next part (like a seamless transition).
Maybe you could create a Touched Event that will Move the player up the block using TweenService
local Part = script.Parent -- define.
local StepUpPart = script.Parent.StepUpPart -- define.
local TweenService = game:GetService("TweenService") -- gets tween service
local Debounce = os.clock() -- Defines Debounce
local TweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) -- Defines TweenInfo, feel free to customize
local function OnTouch(Hit)
if (os.clock() - Debounce) < 0.8 then return end
if Hit.Parent:FindFirstChild("Humanoid") then
local Character = Hit.Parent
local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
if Character:GetPivot().Position.Y >= Part.Position.Y then
HumanoidRootPart.Anchored = true
HumanoidRootPart.CanCollide = false
local Tween = TweenService:Create(HumanoidRootPart, TweenInfo, {Position = StepUpPart.Position})
Tween:Play()
Tween.Completed:Connect(function()
HumanoidRootPart.Anchored = false
HumanoidRootPart.CanCollide = true
end)
end
end
Debounce = os.clock()
end
Part.Touched:Connect(function(OnTouch)
You could convert into a single script by iterating over all of the BasePart instances in the workspace and connecting their .Touched events to the same callback function, like in the following.
for _, Part in ipairs(workspace:GetDescendants()) do
if Part:IsA("BasePart") then
Part.Touched:Connect(function()
print("Hello world!") --whenever a part is touched this string is printed to the console
end)
end
end