Here is my script but when the tool is equipped using a GUI, the tool parts fall but everything is welded.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local remoteEvent = ReplicatedStorage:WaitForChild("EquipTool")
local function Handle_Event(player, get_Item_Name)
local gw = game.Workspace
local get_humanoid = gw:FindFirstChild(player.Name)
local actual_HM = get_humanoid.Humanoid
print(actual_HM)
local Item_Clone = ReplicatedStorage.Items_Clone_Tool:FindFirstChild(get_Item_Name)
actual_HM:EquipTool(Item_Clone)
end
remoteEvent.OnServerEvent:Connect(Handle_Event)
Oh alright, glad you were able to fix it, also, you should post the updated code and mark it as a solution for any future devs looking for an answer to this problem.
local sc_prt = script.Parent
local player = sc_prt.Parent.Parent.Parent.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Equip_Button = sc_prt.Equip
Equip_Button.MouseButton1Up:Connect(function()
local leaderstats = player.leaderstats
local accessplrgui = player.PlayerGui
local Item_Name = sc_prt.Item_Name:FindFirstChildWhichIsA("TextLabel")
local get_Item_Name = Item_Name.Name
local get_Player_Character = game.Players.LocalPlayer.Character
local Item_Stats = player.Item_Inventory:FindFirstChild(get_Item_Name)
print(get_Item_Name)
if Item_Stats.Value > 0 then
if not get_Player_Character:FindFirstChild(get_Item_Name) then
local Item_Clone = ReplicatedStorage.Items_Clone_Tool:FindFirstChild(get_Item_Name):Clone()
Item_Clone.Parent = get_Player_Character
end
end
end)