#Equipping

1 messages · Page 1 of 1 (latest)

thorny fiber
#

ts doesnt work
Server:

local EquipHandler = {}
local RS = game:GetService("ReplicatedStorage")
local Event = RS.Events:WaitForChild("EquipEvent")

function EquipHandler.Start()
    Event.OnServerEvent:Connect(function(plr, Action)
    
            local Char = plr.Character
            local RightArm = Char:WaitForChild("Right Arm")
            local Tool = Char:WaitForChild("MedievalSword")

            local Bodyattach = Tool:WaitForChild("Bodyattach")
            print(Action)
            if Action == "Equipped" then
                local Motor6D = Instance.new("Motor6D")
                Motor6D.Parent = RightArm
                Motor6D.Part0 = RightArm
                Motor6D.Part1 = Bodyattach
            end
        
    end)
end


return EquipHandler

#

client: ```lua
local EquipHandler = {}
local AnimManager = require(script.Parent.AnimationManager)
local Player = game:GetService('Players').LocalPlayer
local Char = Player.Character or Player.CharacterAdded:Wait()
local Animator = Char:WaitForChild('Humanoid'):WaitForChild('Animator')
local Tool = Player.Backpack:WaitForChild("MedievalSword")
local RS = game:GetService("ReplicatedStorage")
local Event = RS.Events:WaitForChild("EquipEvent")
local Animate = Char:WaitForChild("Animate")
local MedievalSwordAnimate = Char:WaitForChild("MedievalSword")
function EquipHandler.Start()

Tool.Equipped:Connect(function()
    MedievalSwordAnimate.Enabled = true
    Animate.Enabled = false
    Event:FireServer("Equipped")
end)
Tool.Unequipped:Connect(function()
    MedievalSwordAnimate.Enabled = false
    Animate.Enabled = true
    Event:FireServer("Unequipped")
end)

end

return EquipHandler

obsidian bridgeBOT
#

studio** You are now Level 2! **studio

thorny fiber
#

Error: Infinite yield possible on 'Workspace.Sonic_hollow.MedievalSword:WaitForChild("Bodyattach")'

radiant thicket
#

Make sure you did the cases right

#

Bodyattach could be BodyAttach

thorny fiber
#

there is

#

let me check again

#

@radiant thicket

#

sorry for the ping

radiant thicket
#

Ping me when replying to me

thorny fiber
#

k

radiant thicket
# thorny fiber

The script isnt detecting it. This is likely because bodyattach is only on the client.

If i do instance.new("Part") on the client, or part:Destroy() on the client, it will NOT show up on the server

thorny fiber
#

ty

radiant thicket
#

I didnt read your full script so i could be wrong but all im saying is that the server script isnt detecting the bodyatta ch

thorny fiber
radiant thicket
radiant thicket
radiant thicket
#

In your script?

#

😐

thorny fiber
#

uhm