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

Particles parent not equals torso?

local torso = game.Player.Character:FindFirstChild('Torso')

Server = game:GetService("ServerStorage")
Smoke = Server.BlackSmoke

script.Parent.MouseButton1Click:connect(function()
	wait(2)
	Smoke:Clone().Parent = torso
end)

In studio, it tells me the script has no errors. It must be a bug or something. Please clarify my script.

1 answer

✓ Accepted answer

I don't exactly know what you're doing when you input local torso = game.Player.Character:FindFirstChild('Torso'), I'm assuming you're attempting to access a Player. If this is a LocalScript use LocalPlayer. "Secondly", localscripts can not access ServerStorage they must, without doubt, use ReplicatedStorage.

local char = game.Players.LocalPlayer.Character
local torso = char:WaitForChild("Torso")

storage = game:GetService("ReplicatedStorage")
smoke = storage.BlackSmoke

script.Parent.MouseButton1Click:connect(function()
    wait(2)
    smoke:Clone().Parent = torso
end)

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