wait(.5)
local UserInputService = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local charname = char.Name
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Q then
if plr.Team.Name == ("Foundation Personnel") or plr.Team.Name == ("Internal Security Department") then
local cloneSmoke = game.ServerStorage:WaitForChild("Smoke")
local cloneSmoke2 = cloneSmoke:Clone()
cloneSmoke2.Parent = char.UpperTorso
local poofsound = game.ServerStorage["Poof sound"]:Clone()
poofsound.Parent = char.UpperTorso
poofsound:Play()
wait(1)
cloneSmoke.Enabled = false
cloneSmoke:Destroy()
poofsound:Destroy()
end
end
end)
-- EDITED SCRIPT
I don't see why it wouldn't work..

8 comments
First of all, could you edit the question and explain what is supposed to do, and what specifically doesn't work? That is just good practice for asking questions. Saying "it doesn't work" doesn't give me much info to help you off of.
Sorry about that. The question is big so I was like, maybe it wouldn't accept it. Here is the question: The script right here is in charge of cloning the particle of smoke into the upper torso according to the team that the player is in, but it does not seem to be working when I am pressing Q?
what does it shows in output?
Nothing. That I am aware of
Nevermind.. Somehow it is working..
just so you know, use of lightning to store things is deprecated for years, use server storage instead.
It works for me. Are there any errors? Also I would suggest moving everything from under the if statement into your other script. There is no need to have two scripts for this.
And its back to being broken... Let me check.. it is giving me stack beginning and stack en things.. On line 11. Let me repost the script