#help

1 messages · Page 1 of 1 (latest)

dull valve
indigo night
#

Lmmfao

feral glacier
feral glacier
dull valve
#

-- ServerScript in ServerScriptService

local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")

-- Folders and Assets
local Models = RS:WaitForChild("Models")
local Weapons = Models:WaitForChild("Weapons")
local WeaponsWeld = script:WaitForChild("Welds"):WaitForChild("Weapons")
local Animations = RS:WaitForChild("Animations").Weapons
local Events = RS:WaitForChild("Events")
local WeaponEvent = Events:WaitForChild("WeaponEvent")

-- State tables
local Welds = {}
local AnimationsPlaying = {}
local Debounce = {}

Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local torso = char:FindFirstChild("UpperTorso") or char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
if not torso then return end

    char:SetAttribute("Equipped", false)

    local weapon = Weapons.Zweih:Clone()
    weapon.Name = "Zweih"
    weapon.Parent = char

    local weld = Instance.new("Motor6D")
    weld.Name = "WeaponWeld"
    weld.Part0 = torso
    weld.Part1 = weapon
    weld.C1 = WeaponsWeld.Zweih.IdleWeaponWeld.C1
    weld.Parent = torso

    Welds[plr] = weld
end)

end)

Players.PlayerRemoving:Connect(function(plr)
if Welds[plr] then
Welds[plr]:Destroy()
Welds[plr] = nil
end
end)

WeaponEvent.OnServerEvent:Connect(function(plr, action)
if action ~= "Equip/UnEquip" then return end
if Debounce[plr] then return end
Debounce[plr] = true

local char = plr.Character
if not char then return end

local equipped = char:GetAttribute("Equipped")
local torso = char:FindFirstChild("UpperTorso") or char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
local rightArm = char:FindFirstChild("RightUpperArm") or char:FindFirstChild("Right Arm")
local leftArm = char:FindFirstChild("LeftUpperArm") or char:FindFirstChild("Left Arm")
local hum = char:FindFirstChildOfClass("Humanoid")
if not torso or not rightArm or not leftArm or not hum then return end

local weld = Welds[plr]
if not weld then return end

if not equipped then
    -- Equip Weapon
    local anim = hum:LoadAnimation(Animations.Zweih.Main.Equip)
    anim:Play()

    anim:GetMarkerReachedSignal("LeftHand"):Connect(function()
        weld.Part0 = leftArm
        weld.C1 = WeaponsWeld.Zweih.LeftHandWeld.C1
    end)

    anim:GetMarkerReachedSignal("RightHand"):Connect(function()
        weld.Part0 = rightArm
        weld.C1 = WeaponsWeld.Zweih.RightHandWeld.C1
    end)

    anim:GetMarkerReachedSignal("Equip"):Connect(function()
        anim:Stop()
        char:SetAttribute("Equipped", true)
        Debounce[plr] = false

        -- Play idle animation after equipping
        local idleAnim = hum:LoadAnimation(Animations.Zweih.Main.Idle)
        idleAnim:Play()

        AnimationsPlaying[plr] = idleAnim

        Debounce[plr] = false

    end)

else
    -- Unequip Weapon
    local anim = hum:LoadAnimation(Animations.Zweih.Main.Unequip)
    anim:Play()

    -- Stop the idle animation if it's playing
    if AnimationsPlaying[plr] then
        AnimationsPlaying[plr]:Stop()
        AnimationsPlaying[plr] = nil
    end


    anim:GetMarkerReachedSignal("Torso"):Connect(function()
        weld.Part0 = torso
        weld.C1 = WeaponsWeld.Zweih.IdleWeaponWeld.C1
    end)

    anim:GetMarkerReachedSignal("Unequip"):Connect(function()
        anim:Stop()
        char:SetAttribute("Equipped", false)
        weld.C1 = WeaponsWeld.Zweih.IdleWeaponWeld.C1 
        Debounce[plr] = false
    end)
end

end)

script

feral glacier
#

Error?

dull valve
feral glacier
#

Oh god

sleek flicker
# dull valve

lol that looks like a plugin virus interfering with a tool scripted by chatgpt

dull valve
#

i made script didnt work ask chatgpt work and it work bad

glass spireBOT
#

studio** You are now Level 1! **studio

feral glacier
#

Or at least, thats what the error says.

dull valve
feral glacier
dull valve
#

it says source not avable

feral glacier
#

You're cooked

dull valve
#

whatt

#

i delete every plugin still same

indigo night
#

speak English jit

dull valve
#

help