Hi
!
I have a problem when I spawn my attack it works fine except that the angle of the attack is shifted and does not follow the humanoid root part
Do you think I should use CFrame.fromEulerAnglesXYZ ()?
(I’m new to scripting)
The script :
local Meshes = script.Meshes -- on reveille les darons pour trouver le fils inshallah
local RP = game:GetService("ReplicatedStorage")-- on invoque la fonction game get service
local TS = game:GetService("TweenService")
local Debris = game:GetService("Debris")
local LuneModule = {}
function LuneModule.Moon(Folder,Humrp)-- on créer la fonction et la renomme moon dans le folder(attaques stock dans un dossier tiboinshape) et humrp(humanoid)
local meshes = {}
local Lune = Meshes.Lune -- plus de local là que la variable et ses propriétés
Lune.CFrame = Humrp.CFrame * CFrame.new(0,0,-3) -- on adapte on réflechi on s'adapte
Lune.Size = Vector3.new(2.174, 23.626, 27.19) -- on prend toujours tout
Lune.Orientation = Vector3.new(15, -90, 0)
Lune.Parent = Folder
table.insert(meshes, Lune)
local vfxlunebas = Meshes.vfxlunebas
vfxlunebas.CFrame = Humrp.CFrame * CFrame.new(0,2,-3)
vfxlunebas.Size = Vector3.new(13.456, 27.5, 3.899)
vfxlunebas.Orientation = Vector3.new(0, 180, -95)
vfxlunebas.Parent = Folder
table.insert(meshes, vfxlunebas)
local vfxlunemid = Meshes.vfxlunemid
vfxlunemid.CFrame = Humrp.CFrame * CFrame.new(0,4,-3)
vfxlunemid.Size = Vector3.new(16.773, 17.001, 4.478)
vfxlunemid.Orientation = Vector3.new(0, 180, -90)
vfxlunemid.Parent = Folder
table.insert(meshes, vfxlunemid)
local vfxluneup = Meshes.vfxluneup
vfxluneup.CFrame = Humrp.CFrame * CFrame.new(0,5,-3)
vfxluneup.Size = Vector3.new(8.509, 17.679, 3.426)
vfxluneup.Orientation = Vector3.new(0, 180, -95)
vfxluneup.Parent = Folder
table.insert(meshes, vfxluneup)
TS:Create(Lune, TweenInfo.new(.1),{ Position = Humrp.CFrame * Vector3.new(0, 0, -50)}):Play()
TS:Create(vfxlunebas, TweenInfo.new(.1),{ Position = Humrp.CFrame * Vector3.new(0, 2, -50)}):Play()
TS:Create(vfxlunemid, TweenInfo.new(.1),{ Position = Humrp.CFrame * Vector3.new(0, 4, -50)}):Play()
TS:Create(vfxluneup, TweenInfo.new(.1),{ Position = Humrp.CFrame * Vector3.new(0, 5, -50)}):Play()
end
return LuneModule
