How to make a player go through blocks?

Thanks a lot!

Aditionally, do you have a quick idea on how i can make the player vibrate?

Just go left and right continuously.

I’m sorry wot

I don’t believe you worded that right, what would you mean by vibrating? Like slightly changing the character’s orientation?

1 Like

I mean just making the player vibrate, shake, something like that.

Just making it vibrate left and right, i’m sorry i can’t figure out another way of describing it :sweat_smile:

Ok, like this:

https://gyazo.com/3d9cf768fadfe8202e1629082f156e7c

1 Like

Maybe what you could use is a RunService Heartbeat event, which would barely move the Charcter but also result in a somewhat shaking way?

local Character = --I guess define your Character here
local RunService = game:GetService("RunService")
local HRP = Character:WaitForChild("HumanoidRootPart")

RunService.Heartbeat:Connect(function()
    HRP.Position += Vector3.new(math.random(-1000, 1000) * 0.0001, 0, math.random(-1000, 1000 * 0.0001))
end)

I’m actually a bit stumped on how you could implement this :thinking:

1 Like

I’ll try it out, also how do i make it stop?

Edit: I think you may have made it a litte extra because when i tried it out i just teleported to the void.

I guess just put a return to stop the function

You could set a Connection variable to detect when you want it to stop shaking your character, I believe you could do it like this

local Character = --I guess define your Character here
local RunService = game:GetService("RunService")
local HRP = Character:WaitForChild("HumanoidRootPart")
local Connection
local RandomBoolCheck = --You'd need to implement some sanity check I presume

local function ShakeCharacter()
    HRP.Position += Vector3.new(math.random(-1000, 1000) * 0.000001, 0, math.random(-1000, 1000 * 0.000001))
    if RandomBoolCheck.Value == true then
        Connection:Disconnect()
    end
end)

Connection = RunService.Heartbeat:Connect(ShakeCharacter)

Not sure though

This is the script i’m using so far:

local WallParts = workspace.Pillar
local ColissionButton = script.Parent
local Collided = false

local Character = game.Players.LocalPlayer.Character
local RunService = game:GetService("RunService")
local HRP = Character:WaitForChild("HumanoidRootPart")


ColissionButton.MouseButton1Down:Connect(function()
	
	if Collided == false then
		Collided = true
		
		for _, Part in pairs(WallParts:GetChildren()) do
			Part.CanCollide = false
		end
		
		RunService.Heartbeat:Connect(function()
			HRP.Position += Vector3.new(math.random(-100, 100) * 0.0001, 0, math.random(-100, 100 * 0.0001))
		end)
	elseif Collided == true then
		Collided = false
		
		for _, Part in pairs(WallParts:GetChildren()) do
			Part.CanCollide = true
		end
	end
end)

Edit: Do you know how i can implement it?

Maybe this?

local WallParts = workspace.Pillar
local ColissionButton = script.Parent
local Collided = false

local Character = game.Players.LocalPlayer.Character
local RunService = game:GetService("RunService")
local HRP = Character:WaitForChild("HumanoidRootPart")


ColissionButton.MouseButton1Down:Connect(function()
	local Connection

	if Collided == false then
		Collided = true
		
		for _, Part in pairs(WallParts:GetChildren()) do
			Part.CanCollide = false
		end

		local function ShakeCharacter()
			HRP.Position += Vector3.new(math.random(-100, 100) * 0.00001, 0, math.random(-100, 100 * 0.00001))
		end

            Connection = RunService.Heartbeat:Connect(ShakeCharacter)
	elseif Collided == true then
		Collided = false
		Connection:Disconnect()

		for _, Part in pairs(WallParts:GetChildren()) do
			Part.CanCollide = true
		end
	end
end)

No clue

1 Like

No problem, you already helped me with my main problem.

I really appreciate you helping me yesterday and today, and also all the other people i’ve seen you helping while helping me.

Thanks for everything tho.

1 Like