I often encounter a block that, when touched, makes the player lose gravity and float smoothly upwards, but remains confined within the block’s area. I’ve searched the Toolbox but couldn’t find such a block—probably because I used the wrong keywords.
Does anyone know what this block is called? Is there a ready-made model or a script available to recreate this effect?
I’ve attached a video showing how the block works.
1 Like
Hello, if I understood you right, you would want basically this script here:
local touchingPlayers = {}
local block = script.Parent
block.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
touchingPlayers[player] = true
end
end)
block.TouchEnded:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
touchingPlayers[player] = false
end
end)
while true do
for player, isTouching in pairs(touchingPlayers) do
if isTouching then
local character = player.Character
if character then
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
humanoidRootPart.CFrame = humanoidRootPart.CFrame + Vector3.new(0, 1, 0)
end
end
end
end
task.wait()
end
As I currently don’t have access to Roblox Studio, I’m unable to help you further currently if you have any problems.
2 Likes
After doing some searching (Specifically for the ETOH Tower Creation Kit), I found something that seemed to just be an expansion of said kit.
return function()
script.Parent.TopSurface = 'Studs'
if script.Parent.Name == "ButtonActivatedPlatform" or script.Parent:FindFirstChild("ButtonActivated") then
local a = Instance.new("BoolValue",script.Parent)
a.Name = "Activated"
if script.Parent:FindFirstChild("Invert") then
a.Value = true
end
end
local players = not script.Parent:FindFirstChild("IgnorePlayers")
local boxes = not script.Parent:FindFirstChild("IgnoreBoxes")
local speed = script.Parent:FindFirstChild("Speed") and script.Parent.Speed.Value or 40
local maxForce = script.Parent:FindFirstChild("MaxForce") and script.Parent.MaxForce.Value or math.huge
script.Parent.Touched:Connect(function(part)
if script.Parent:FindFirstChild("Activated") and not script.Parent.Activated.Value then return end
local torso = part.Parent:FindFirstChild("Torso") or part
if (not torso:FindFirstChild("ElevatorVelocity") and (part.Parent:FindFirstChild("Humanoid") and players) or ((part.Name == "Pushbox" or part:FindFirstChild("IsBox") ~= nil) and boxes)) then
local velocity = Instance.new("BodyVelocity", torso)
velocity.Name = "ElevatorVelocity"
local uv=script.Parent.CFrame.UpVector
local maxf=Vector3.new(0,maxForce,0)
if uv.X ~= 0 then maxf = Vector3.new(maxForce, maxf.Y, maxf.Z) end
if uv.Z ~= 0 then maxf = Vector3.new(maxf.X, maxf.Y, maxForce) end
velocity.MaxForce = maxf
velocity.Velocity = script.Parent.CFrame.UpVector*speed
end
end)
script.Parent.TouchEnded:Connect(function(part)
local torso = part.Parent:FindFirstChild("Torso") or part
if torso:FindFirstChild("ElevatorVelocity") and (part.Parent:FindFirstChild("Humanoid") and players) or ((part.Name == "Pushbox" or part:FindFirstChild("IsBox") ~= nil) and boxes) then torso.ElevatorVelocity:Destroy() end
end)
end
All these tower games are built off what ETOH (Eternal Towers of Hell) is. If you’re looking for something from them, you’re looking for what the ETOH kit has.
Hello,
Thank you so much for your script! Sorry for the possibly late reply, but I checked your script. There were some issues - the player was launched into space instead of being contained within the block. But I fixed this error myself, so I’ll mark your response as the solution!
Thank you very much again, you helped me a lot!)
1 Like