Hi so.. My script is just testing my onEnter particle emitter script. Its supposed to work and insert a particle emettir for 5 seconds when u enter the game. 12:51:00.939 - Workspace.Particle Emitter:6: '<name>' expected near '/' Thats the error. The output shows.
Par = Instance.new("ParticleEmitter", character) game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) Par.Texture = http://www.roblox.com/Fire-item?id=32312686 wait(5) :Destroy() end) end)
Help would be appreciated thanks in advance:)
You forgot to place quotation marks around your Id, And you have :Destroy
in a undefined way, You must define what you are going to destroy, The third thing that will error is your ParticleEmitter Instance variable, you are placing it in character, and character hasn't been defined till player.CharacterAdded
, this will give a Global
error.
Id = "Id Here" game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) Par = Instance.new("ParticleEmitter", character.Torso) Par.Texture = "rbxasset://"..Id wait(5) Par:Destroy() end) end)
Par = Instance.new("ParticleEmitter", character) game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) Par.Texture = "http://www.roblox.com/Fire-item?id=32312686" wait(5) Par:Destroy() end) end)
Also, I prefer to use variables for ID's, so I would do it such as..
local particleId = 32312686 Par = Instance.new("ParticleEmitter", character) game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) Par.Texture = "http://www.roblox.com/Fire-item?id=" .. particleId wait(5) Par:Destroy() end) end)
That way, you can change the Id anytime you want easily.