How do I make something like the Jailbreak Piston Crusher?

  1. What do you want to achieve? Keep it simple and clear!

Hello, I want to achieve something like this in Jailbreak the piston crusher that makes their Character tiny when the crusher landed on them.

  1. What is the issue? Include screenshots / videos if possible!

the problem is when I touch the side of the part it makes my Character smaller. But I only want the bottom part of Y axis to have the ability to do that.

https://photos.app.goo.gl/rqSoypQkiTG8QtE68

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I did my research on google as well as on the devforum but couldn’t find a solution or similar topics to this.

  • here is my script, Its a serverscript in serverscriptservice
local tweenservice = game:GetService("TweenService")
local W = game.Workspace:WaitForChild("W")
local debounce = false

local player = game.Players.PlayerAdded:Connect(function(player)
	local Character = player.Character or player.CharacterAdded:Wait()
	local Humanoid = Character:WaitForChild("Humanoid")
	local TypeScale = .2

	local S = TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In, -1, true, 3.5)
	local P = {Position = Vector3.new(558.5, 9, -155)}

	local A = tweenservice:Create(W, S, P)

	A:Play()
	
	W.Touched:Connect(function()
		if Humanoid then
			if debounce == false then
				debounce = true
				print(debounce)
				Humanoid.HeadScale.Value = TypeScale
				Humanoid.BodyTypeScale.Value = TypeScale
				Humanoid.BodyHeightScale.Value = TypeScale
				Humanoid.BodyDepthScale.Value = TypeScale
				print("Roti Prata")
				wait(10)
				Humanoid.HeadScale.Value = 0.95
				Humanoid.BodyTypeScale.Value = 0
				Humanoid.BodyHeightScale.Value = 0.9
				Humanoid.BodyDepthScale.Value = 0.85
				print("Normal!")
				wait(3)
				debounce = false
				print(debounce)
			end
		else
			print("Error!")
		end
	end)
end)
1 Like

You could just have a small thin part on the bottom of the larger part, and use the touched event on the smaller part.

1 Like

you could add an invisible part which is just the bottom and make the player small when you touch that invisible part

im saying hi to you from malaysia!

2 Likes

Oh! Hello :smiley:

btw, can you show me an example?

basically the same as
"do you mean like this and make the small part transparent?
image"

but how do I tween it? Its two object tho

instead of welding both of them use a motor 6d to stick the parts then you can tween one of them and the other will follow

how does motor6 work tho? Could you show me an example?