if i dont have the repeat untill
it give the error RightGrip is not a valid member of MeshPart
, so if i dont have it the script would break.
also, i think its now 100% percent ready, but im going to put the final version of the localscript on here to make sure no one says it doesn’t work in their opinion.
local tool = script.Parent.Parent
local plr = game.Players.LocalPlayer
local chara = plr.Character
local components = {
righthand = chara:WaitForChild("RightHand"), --the weld
waistOn = tool.Handle.Values.WaistOn --the boolvalue toggle
}
local function Equiped()
components.waistOn.Value = false --on every equip it changes it to off
end
local function Activate()
if components.waistOn.Value == true then
components.waistOn.Value = false
else
components.waistOn.Value = true
end
end
tool.Activated:Connect(Activate)
tool.Equipped:Connect(Equiped)
while true do
repeat wait() until components.righthand
if tool.Parent == chara then
if components.waistOn.Value == true then
chara.RightHand.RightGrip.Part0 = chara.LowerTorso
chara.RightHand.RightGrip.C0 = CFrame.new(math.rad(65), math.rad(-30), math.rad(15)) * CFrame.Angles(math.rad(135), 0, 0)
else
chara.RightHand.RightGrip.Part0 = chara.RightHand
chara.RightHand.RightGrip.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(-90), 0)
end
end
wait()
end
thank y’all so much for the help!