Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would you weld a part to a player?

Okay, so what I tried to do is to make an aura that would sit at the player's feet and move around with the player.

		local aura = Instance.new("Part", character)
		aura.Shape = "Cylinder"
		aura.Size = Vector3.new(0.3,20,20)
		aura.Material = "Neon"
		aura.BrickColor = BrickColor.Green()
		aura.Transparency = 0.5
		aura.CanCollide = false
		aura.Anchored = false
		aura.CFrame = aura.CFrame * CFrame.Angles(0,0,-140)
		local weld = Instance.new("Weld", aura)
		weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
		weld.C0 = weld.C0 - Vector3.new(0,8,0)
		weld.Part0 = aura
		weld.Part1 = character:WaitForChild("Humanoid").Torso

The problem with this is that it makes the player's movement really awkward as if the aura can collide, but I set CanCollide to false. Is there a better way to create the aura underneath the player without welds or how would I fix this?

1 answer

Heads-Up Im fixing this on Mobile. Im tired so... This may not work as I planned. ;p If it doesnt work. Then, sorry 2 tired. Hopefully it does tho.

local char = game.Players.LocalPlayer.Character
local h = char:WaitForChild("Humanoid")
local t = char:WaitForChild("Torso")

local aura = Instance.new("Part", char)
aura.Shape = "Cylinder"
aura.Size = Vector3.new(0.3,20,20)
aura.Material = "Neon"
aura.BrickColor = BrickColor.new("Green")
aura.Transparency = 0.5
aura.CanCollide = false
aura.CFrame = aura.CFrame * CFrame.new() * CFrame.Angles(0,0,-140)
local weld = Instance.new("Weld", aura)
weld.Part0 = aura
weld.Part1 = char.Torso
weld.C0 = CFrame.new() * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
weld.C0 = weld.C0 - Vector3.new(0,8,0)
aura.Anchored = false

This discussion is preserved as it was. New answers, comments, and votes are closed.