Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isnt my ball showing up in the player's hand?

Asked by
rexpex 45
7 years ago

I made this script when the player is holding a tool and clicks it starts an animation and a ball of lightning appears on his arm. The animation works fine but the ball only shows up at all. here is the script

tool = script.Parent

replicatedstorage = game:GetService("ReplicatedStorage")
staticball = replicatedstorage.RicoClass:findFirstChild("Lightning")


tool.Selected:connect(function(mouse)
    mouse.Button1Down:connect(function()
    local player = game.Players.LocalPlayer
    local Humanoid = player.Character.Humanoid
---------------------------------------------------------------------------------
        local Punch = Instance.new("Animation")
        Punch.AnimationId = "http://www.roblox.com/Asset?ID=644505212"
        local animTrack = Humanoid:LoadAnimation(Punch) 
            animTrack:Play(0,2,2.5)
---------------------------------------------------------------------------------           
    local light = replicatedstorage.RicoClass:WaitForChild("Lightning")
    light:clone()

        light.Parent = player.Character
        light.Anchored = false
        light.CanCollide = false
        local w = Instance.new("Weld" ,light)
        w.Part0 = player.Character.RTIndexFinger
        w.Part1 = light
        w.C1 = CFrame.Angles(0,0,40)
        w.C0 = CFrame.new(0,0,0.2)


    end)



end)


0
Are you in first person? If so, it will not appear, as it's part of your character. Xiousa 156 — 7y
0
It works in roblox studios but it doesnt work in a actual server. rexpex 45 — 7y

Answer this question