Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script clones the particles of smoke into torso according to team,but doesn't work pressing Q?

Asked by
bt6k 23
4 years ago
Edited 4 years ago
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..

0
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. blazar04 281 — 4y
0
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? bt6k 23 — 4y
0
what does it shows in output? Necro_las 412 — 4y
0
Nothing. That I am aware of bt6k 23 — 4y
View all comments (4 more)
0
Nevermind.. Somehow it is working.. bt6k 23 — 4y
0
just so you know, use of lightning to store things is deprecated for years, use server storage instead. Necro_las 412 — 4y
0
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. blazar04 281 — 4y
0
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 bt6k 23 — 4y

Answer this question