✓ Accepted answer
In your script, you should be getting the error Instance is not a valid member of Torso. This is because you can not go straight into making a new object when you're in the location. You want to make the new object first, then place it in the desired location. Fortunately, there is an optional second argument to Instance.new() that allows you to set a location for the object. You would also get the error, character is not a valid member of workspace. This is because in workspace, there is no model or object named character. Your script should look more like.
function onButtonClicked()
Instance.new("Sparkles", game.Players.LocalPlayer.Character.Torso)
end
script.Parent.MouseButton1Click:connect(onButtonClicked)
Check out this wiki article if I did not explain Instance.new well enough.
You can also check here to see how LocalPlayer works.
2 comments
Is there something called "character" in workspace? I'm pretty sure the name of the model of the player's character has the name of the player.
PlayerWhoClicked doesn't work too