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

Im new, and I need help on this localscript that produces particles, more info in desc..?

Asked by 7 years ago

So I am creating a localscript that produces particles out of the right arm of a player, and it won't work. The particles will either just stay in one spot if anchored, and if not anchored it will just fall off. Also this is not cancollide. Read the script.

local UserInputService = game:GetService("UserInputService")
Player = game.Players.LocalPlayer
mouse = Player:GetMouse()

repeat wait() until Player.Character

local char = Player.Character
local torso = char:findFirstChild("Torso")
local rightarm = char:findFirstChild("Right Arm")

enabled = true

HoldVariable = 0

local function onInputBegan(input,gameProcessed)
    if input.KeyCode == Enum.KeyCode.E and HoldVariable == 0 then
        HoldVariable = 1
        torso.Anchored = true
        local keyPressed = input.KeyCode
        local hum = game.Players.LocalPlayer.Character.Humanoid
        local anim_feet = hum:LoadAnimation(script.Parent.RArmAnim)
        local current = anim_feet
        current:Play()
        wait(0.7)
        local part = char["Right Arm"]:Clone()
        part.BrickColor = BrickColor.new('Institutional white')
        part.Material = "Neon"
        part.Name = "RightArm2"
        part.CFrame = rightarm.CFrame
        part.Anchored = true
        part.CanCollide = false
        wait()
        part.Parent = char
        for i = 1, 10 do
            part.Size = part.Size +Vector3.new(0.1,0.1,0.1)
            part.Transparency = part.Transparency + 0.1
            part.CFrame = rightarm.CFrame
            wait()
        end
        part:destroy()
        rightarm.BrickColor = BrickColor.new('Gold')
        rightarm.Material = 'Neon'
        rightarm.Reflectance = 0
        local x = game.ReplicatedStorage.Flame:Clone()
        x.Parent = workspace
        x.CFrame = rightarm.CFrame*CFrame.new(0, 0, 0)
        torso.Anchored = false

    end
end

UserInputService.InputBegan:connect(onInputBegan)

PLS HELP ASAP!

0
Did you try position? MrHerkes 166 — 7y
0
i did, it didn't work. Amputea 2 — 7y
0
Have you tried making a RemoteEvent ,that links into a Script, when the player presses E rexpex 45 — 7y
0
ill try Amputea 2 — 7y

Answer this question