#Random particle's orientation pb

1 messages · Page 1 of 1 (latest)

honest sinew
silent ibex
#

code?

honest sinew
#

i know there is a way but i forgot

#

like "" lua or something

silent ibex
tired templeBOT
#

studio** You are now Level 2! **studio

silent ibex
#

triple backticks

#

`

honest sinew
#

oh thx

#

wait

#

local :

local player = game:GetService("Players").LocalPlayer
local RunService = game:GetService("RunService")
local mouse = player:GetMouse()
local MB1event = game.ReplicatedStorage.Sword1Spells.Spell1.MB1event
local tool = script.Parent.Parent
local MB1debounce = false

local equipped = false

tool.Equipped:Connect(function()
    equipped = true
end)

tool.Unequipped:Connect(function()
    equipped = false
end)

local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild("HumanoidRootPart")
local CFrame1 = nil

--RunService.RenderStepped:Connect(function()
--    if mouse and mouse.Hit then
--        local mousePos = mouse.Hit.Position
--        local lookAt = Vector3.new(mousePos.X, hrp.Position.Y, mousePos.Z)
--        CFrame1 = CFrame.new(hrp.Position, lookAt)
--    end
--end)

RunService.RenderStepped:Connect(function()
    local cam = workspace.CurrentCamera
    if cam then
        local camLook = cam.CFrame.LookVector
        local flatDirection = Vector3.new(camLook.X, 0, camLook.Z).Unit
        local lookAt = hrp.Position + flatDirection
        CFrame1 = CFrame.new(hrp.Position, lookAt)
    end
end)

UIS.InputBegan:Connect(function(input,gameProssessed)
    if gameProssessed then return end
    if input.UserInputType == Enum.UserInputType.MouseButton1 and equipped then
        if MB1debounce == true then return end
        if not CFrame1 then return end
        --local playerModule = require(player:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule"))
        --local controls = playerModule:GetControls()
        --controls:Disable()
        MB1debounce = true
        MB1event:FireServer(CFrame1, hrp)
        wait(1)
        MB1debounce = false
        --controls:Enable()
    end
end) ```
honest sinew
#

this one is too big mb

silent ibex
#

use .Activated

honest sinew
silent ibex
honest sinew
#

but thats not my problem

#

currently at least

silent ibex
#

wait is your problem the direction of the slash vfx?

honest sinew
#

the particle is random while being not random