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

How would i Attach an effect to the player?

Asked by
Roguzy 2
4 years ago

local c = Player.Character if Enabled == false then return end if Action == "Combat" then Enabled = false if Combo == 1 then

       local FX = game.Workspace.FX.Handle--the effect
        FX.CFrame = c.RightHand.CFrame*CFrame.new(0,0,.3)

       this is a snip of a combat script in which i want an effect to follow their punches i got the effect to spawn in and work but i want to attach the effect to the players fists instead of it just spawning and staying still as what happens for rn is when i click the button the effect spawns in and just stays in the same place please help!

1 answer

Log in to vote
0
Answered by
Dfzoz 489 Moderation Voter
4 years ago

you can use Weld or Motor6D to do this: Create a Weld object with instance.new> set part0 and part1 to the parts you want to weld> set parent to the effect so it gets destroyed along with it when you dont want to use it anymore>Profit. If you want to offset the attachment you can set C0 and C1 with a CFrame Value.

Ad

Answer this question