I made a Boombox tool that welds to player’s Torso’s back when activated but im experiencing the welding problem.When welded, it slides slightly to the side. after many attempts,it slides even many more.
The script that i made by myself:
local tool = script.Parent
local boombox = tool.Handle
tool.Activated:Connect(function()
local plr = game.Players:GetPlayerFromCharacter(tool.Parent)
if boombox then
local newmodel = boombox:Clone()
newmodel.Name = "Boombox"
newmodel.Parent = plr.Character
newmodel.CFrame = plr.Character.UpperTorso.CFrame
local weld_constraint = Instance.new("WeldConstraint",plr.Character.UpperTorso)
weld_constraint.Part0 = weld_constraint.Parent
weld_constraint.Part1 = newmodel
weld_constraint.Parent = plr.Character.UpperTorso
newmodel.Position = newmodel.Position - Vector3.new(0.8,0,0)
wait(0.25)
newmodel.Rotation = newmodel.Rotation + Vector3.new(0,180,45)
plr.PlayerGui.Buttons.Boombox.Visible = true
tool:Destroy()
end
end)
I have tried searching this issue but i still couldn’t reached my goal.
What should i do?