How do I weld a tool to a player's torso, I'm trying to make a flashlight tool that doesnt get held in the hand, rather it's a light coming from the player's body like this (https://thief-simulator.fandom.com/wiki/Flashlight?file=Flashlight.jpg), here is my code, it just makes the light at the middle of the map.
local flashlight = script.Parent.light local player = game.Players.LocalPlayer local character = game.Workspace:FindFirstChild(player.Name) local weld = Instance.new("Weld",flashlight) weld.Part0 = flashlight weld.Part1 = character["Torso"] weld.C0 = CFrame.new(0, 0, 0) + Vector3.new(0,character["RightHand"].Size.Y/2,0)
Actually, You can just add a light to the player body.
Every single time character is Loaded, you can add Light to the player Torso by using Instance.new()
!
For Example:
--Making Part local Part = Instance.new("Part") Part.Name = "Part" Part.Parent = workspace
Solution:
game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) if not Character.Humanoid:FindFirstChild("Flashlight") then local Flashlight = Instance.new("SpotLight") Flashlight.Name = "Flashlight" --Config Flashlight.Angle = 90 Flashlight.Brightness = 20 Flashlight.Range = 16 --End Flashlight.Parent = Character.HumanoidRootPart end end) end)
Hope It Helps!