I was experimenting in the studio and I was wondering:
How to make a player “anchor” with the part?
In other words, the player is glued to the part.
Currently I have only done this, I think it should serve what I want to achieve:
game.Workspace.Part1.Touched:Connect(function(Object)
if Object.Parent:FindFirstChild(“Humanoid”) then
print(“Character Detected”)
end
end)
There are a couple resources you could use to achieve this and learn how welds work. I’d recommend looking into this link first: Welds Wiki Then you could also watch a video too if that will help the learning process. Here is a good one for welds: Weld video
I thought it was pretty specific, if you want a glue-type functionality, use the code @topdog_alpha wrote for you and make sure the part that the player is being welded too is anchored. This will prevent the player from moving from the brick AKA glue-type effect. Also take a look at the resources I posted. The ROBLOX Wiki is pretty helpful. One last thing to note, When you want the player to be unglued, make sure to destroy the weld using
new:Destroy()
Then every time the touched event runs again, if you used the code provided it will make a new instance of the weld and weld the player to the brick.