Welding Help! (Click Detector)

So the code that @Enk514 put is pretty good, and i’d like to make some modifications.

part = Instance.new("Part") 
part.Size = 4,8,4 -- 4 8 4 so it is bigger than the player itself
part.CanCollide = false -- if not then the player would get stuck
part.Parent = game.workspace.YourPlayer'sCharacter.HumanoidRootPart
-- parented it there so it is more organized
--also change YourPlayer'sCharacter to the actual player's name (don't copypaste the script blindly)
part.Name = "ClickPart"
--also you may want to change the Transparency with part.Transparency = 1
weld = Instance.new("Weld")
weld.Part0 = Part
weld.Part1 = game.workspace.YourPlayer'.'sCharacter.HumanoidRootPart
weld.C0 = CFrame.new(Vector3.new(0,0,0))
ClickDetector = Instance.new("ClickDetector") 
ClickDetector.Parent = part
2 Likes