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

Particles on click?

Asked by 9 years ago

Hi I have been wondering how people put particles inside their player when the play clicks the text button can you please help making the script work?

`plr = game.Workspace.Player

function onClicked()
    Instance.new("Fire", plr.Head)
end
script.Parent.MouseButton1Down:connect(onClicked)`
1
are the two `'s ment to be there? NotSoNorm 777 — 9y

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

You have a ' on the and last line, which is messing it up, remove that. Also, Head isn't inside the player, it's inside the Character. But Player isn't always going to be the player's name. You should use LocalPlayer.

local plr = game.Players.LocalPlayer --Define the player using localplayer

function onClicked()
    Instance.new("Fire", plr.Character.Head)
end

script.Parent.MouseButton1Down:connect(onClicked)

NOTE: This will only work if it's in a localscript!

0
where is the other script!?!?! docrobloxman52 407 — 9y
0
Click advanced objects then localscript while selectig the gui. Goulstem 8144 — 9y
Ad

Answer this question