Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make sparkles start in a players torso when the player touches a block?

I would like it to be where when a player touches a block, they get "Sparkles" coming out of their torso.

1 answer

✓ Accepted answer

Assuming you have a part named Button in Workspace, this should work:

game.Workspace.Button.Touched:connect(function(hit)
    if hit.Parent:FindFirstChild("Torso") then
        if not hit.Parent.Torso:FindFirstChild("Sparkles") then
            Instance.new("Sparkles", hit.Parent.Torso)
        end
    end
end)

Line 1: Connecting Touched event

Line 2: Checking if the Torso exists

Line 3: Checking if Sparkles already exist in the torso

Line 4: Adding sparkles

1 comment

0

Thank you, that worked. You're awesome :3

This discussion is preserved as it was. New answers, comments, and votes are closed.