And how would I do that exactly? Im sorry im pretty new to stuff like this and I find these things truly complex, is it something I can just do or does it require me to add it to the script?
-- Place this at the beginning of your .Equipped function.
local RightArm = Character:FindFirstChild("Right Arm")
RightArm:FindFirstChild("Right Grip"):Destroy()
By the way, you should probably do all your code in a separate server script (especially when instancing Motor6Ds and assigning Property, otherwise if you do it on the client (localscript) only YOU can see it. See Remote Events.
Sadly its not working, hand is still missing (its inside the torso since the handle is positioned there)
Did I write it correctly? Again, I apologize as I have no idea what im doing and its like 7am, my brain isnt with all its lights on !!
-- Check if the parent is a Tool
if script.Parent:IsA("Tool") then
-- Connect the Equipped event
script.Parent.Equipped:Connect(function()
-- Get the character from the tool
local character = script.Parent.Parent
-- Check if character exists
if character and character:IsA("Model") then
-- Create a Motor6D instance
local motor = Instance.new("Motor6D")
motor.Name = "ToolMotor" -- Name it whatever you want
motor.Parent = character.UpperTorso
motor.Part0 = character.UpperTorso
motor.Part1 = script.Parent.Handle
-- Set the desired position and rotation (adjust as needed)
local offset = Vector3.new(0, 0, 0) -- Adjust position offset
local rotationOffset = CFrame.Angles(0, math.rad(90), 0) -- Adjust rotation offset
motor.C0 = CFrame.new(offset) * rotationOffset
local RightArm = character:FindFirstChild("Right Arm")
if RightArm then
local RightGrip = RightArm:FindFirstChild("Right Grip")
if RightGrip then
RightGrip:Destroy()
end
end
end
end)
-- Connect the Unequipped event
script.Parent.Unequipped:Connect(function()
-- Get the character from the tool
local character = script.Parent.Parent
-- Check if character exists
if character and character:IsA("Model") then
-- Find and destroy the Motor6D instance
local motor = character.UpperTorso:FindFirstChild("ToolMotor")
if motor then
motor:Destroy()
end
end
end)
else
print("Script must be placed directly within the Tool object.")
end
Your character is on R15, so you should use Character:FindFirstChild("Right Hand")
Changed that and still the same, no idea what im doing wrong, console isnt showing any errors either
ehh that’s strange, show me the right hand explorer whilst having the tool equipped in playtesting mode
this?
Whoops, my bad. In your code remove the spaces between ("Right Arm")
and ("Right Grip")
Still the same sadly
Sending the code again in case there is something that im missing
-- Check if the parent is a Tool
if script.Parent:IsA("Tool") then
-- Connect the Equipped event
script.Parent.Equipped:Connect(function()
-- Get the character from the tool
local Character = script.Parent.Parent
-- Check if character exists
if Character and Character:IsA("Model") then
-- Create a Motor6D instance
local motor = Instance.new("Motor6D")
motor.Name = "ToolMotor" -- Name it whatever you want
motor.Parent = Character.UpperTorso
motor.Part0 = Character.UpperTorso
motor.Part1 = script.Parent.Handle
-- Set the desired position and rotation (adjust as needed)
local offset = Vector3.new(0, 0, 0) -- Adjust position offset
local rotationOffset = CFrame.Angles(0, math.rad(90), 0) -- Adjust rotation offset
motor.C0 = CFrame.new(offset) * rotationOffset
local RightHand = Character:FindFirstChild("RightHand")
if RightHand then
local RightGrip = RightHand:FindFirstChild("RightGrip")
if RightGrip then
RightGrip:Destroy()
end
end
end
end)
-- Connect the Unequipped event
script.Parent.Unequipped:Connect(function()
-- Get the character from the tool
local Character = script.Parent.Parent
-- Check if character exists
if Character and Character:IsA("Model") then
-- Find and destroy the Motor6D instance
local motor = Character.UpperTorso:FindFirstChild("ToolMotor")
if motor then
motor:Destroy()
end
end
end)
else
print("Script must be placed directly within the Tool object.")
end
did RightGrip get deleted while playtesting?
If you mean this, then no
try placing the thread to the beginning of your .Equipped function. could be something that’s preventing it from deleting either from one of your line of code or due to sanity checks
so sorry but im confused as what you mean by thread and where it should be placed
okayy nevermind
you don’t need all these checks since you already made sure that Character exists
local RightHand = Character:FindFirstChild("RightHand")
local RightGrip = RightHand:FindFirstChild("RightGrip")
RightGrip:Destroy()
place this in the beginning of .Equipped event, and tell me what happens
Something like this? If so, play tested and it basically did bring the hand to the normal position, but the tool wasnt attached to the torso anymore
Sorry for asking so many things its just that everything is kinda confusing when you dont know what you are doing
did “ToolMotor” get created? if not i think you should do it on the server and not on the client
i am also confused haha, with the rest of your code the tool should have been positioned to torso without involving the hand
Just checked and no it didnt
I might just get back to this in the morning, way too late right now and I think thats also affecting this whole process lol
in case you would like to take a look at it and maybe you find something else, here is the model (you obviously dont have to, but just in case you’d like to)
But thank you for trying and help still, will get back to this tomorrow
just tested out your model, seems perfectly fine. only needs a bit more offsetting to properly place the entire model beneath the player’s foots. only the arm of the player needs fixing, which can be done via. this user’s solution: How to delete the "Hand up" animation that plays when equipping a tool?
also, you should use humanoidrootpart to weld the “ritual” part instead of uppertorso, since it can result in the item getting turned over when the player is.
Got it to work!! Just made so it waits for the RightGrip weld to load inside the player’s right hand when equiped, and just changes Part0 from RightHand to the RootTorso, easy fix
Thank you so much again still for trying and help!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.