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

This script only works in Studio Mode?

It's a local script in the starter Gui.

here's the script

local char=game.Players.LocalPlayer.Character
local gui=Instance.new("ParticleEmitter")

gui.Parent=char.Torso
gui.Texture = "http://www.roblox.com/asset/?id=160041569"
gui.VelocitySpread = 45

All Help Is appreciated!

2 answers

✓ Accepted answer

Char is nil

LocalScripts run before the Character is added. Perhaps use this:

local p = game.Players.LocalPlayer;
local char = p.Character or p.CharacterAdded:wait();

woof woof

Here's the revision

local plr = game.Players.LocalPlayer
local char = plr.CharacterAdded:wait()  -- wait for the character before the script starts
local torso = char:WaitForChild('Torso') -- wait for the charcter's torso
local gui = Instance.new("ParticleEmitter",torso) -- You can put torso here instead of using parent.

gui.Texture = "http://www.roblox.com/asset/?id=160041569"
gui.VelocitySpread = 45
-- rest of your emitter settings here

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