Is the function “Unique Aura” called? Like, if you put a print right at the start, inside the function does it print?
Wait, in the “UniqueAura” function I see you just create variables but don’t do anything, see?:
function Module.UniqueAura(player, UserId, Character)
Aura1.Color = ColorSequence.new(Color3.new(1, 1, 1))
Aura2.Color = ColorSequence.new(Color3.new(0, 0, 0))
EyeRedLeft.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
EyeRedRight.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
AuraBloom1.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
AuraBloom2.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
ShineRight.Color = ColorSequence.new(Color3.new(0.941176, 0.941176, 0.941176))
Shineleft.Color = ColorSequence.new(Color3.new(0.941176, 0.941176, 0.941176))
end
So in that function basically it would basically change the color of the aura or the particles. This worked before but it seems to not work now. It should still add the particles.
Heres a video of me explaining.
Oh, wait! I take back my statement. You are changing values but you aren’t generating the Aura. The Aura function does a bunch of stuff, (generating the Aura, attachments etc…) meanwhile the UniqueAura just changes colours. I believe you need to call Aura in Unique Aura. Something like this:
function Module.UniqueAura(player, UserId, Character)
Module.Aura(player, UserId, Character)
...
Hmmm… So I tried that out but I got an error /: why could that be?
if(v == player.UserId) then
warn("Yes")
AuraModule.Aura(player.UserId,character)
AuraModule.UniqueAura(player.UserId, character)
found = true
break
end
end
if(not found) then
warn("No!")
AuraModule.Aura(player, player.UserId, character)
task.wait(1)
warn("Awakened")
end```
ITS GOLD NOW!!! I just had to change the order around! Why did I have to change the order around for it to work???
for i, v in pairs(playerID) do
if(v == player.UserId) then
warn("Yes")
AuraModule.UniqueAura(player.UserId, character)
AuraModule.Aura(player, player.UserId, character)
found = true
break
end
end
if(not found) then
warn("No!")
AuraModule.Aura(player, player.UserId, character)
task.wait(1)
warn("Awakened")
end```
So the reason it isn’t working is that your function requires 3 arguments:
player, userid, character
You are giving only the userid
and character
, see?:
AuraModule.UniqueAura(player.UserId, character)
player.UserId
character
However, I think it is best to just put the function inside UniqueAura, that way you just call one function. So like this:
function Module.UniqueAura(player, UserId, Character)
Module.Aura(player, UserId, Character)
Aura1.Color = ColorSequence.new(Color3.new(1, 1, 1))
Aura2.Color = ColorSequence.new(Color3.new(0, 0, 0))
EyeRedLeft.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
EyeRedRight.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
AuraBloom1.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
AuraBloom2.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
ShineRight.Color = ColorSequence.new(Color3.new(0.941176, 0.941176, 0.941176))
Shineleft.Color = ColorSequence.new(Color3.new(0.941176, 0.941176, 0.941176))
end
I’ll do that too. Man thanks for all the help!
Also, for for other people be sure to fix this:
so people aren’t be able to see the image!
Oh my bad. Also will this fix the glitch with other people having the unique aura after I turn mine on?
it won’t, the reason why other people also have the golden one is because your module is using global vars. Think of it as this:
local var1 = "I am text"
local func1 = function()
var1 = "nice"
end
local func2 = function()
print(var1)
end
func1()
func2() --Prints 'nice'
So basically what you’re saying is when I change the function, it changes for everyone. So how would I go around changing that?
Can you send me the code again so I can fix it and then later explain how it works? (Like the updated version with all the changes)
local AuraRemote = script.Parent
local AuraModule = require(game.StarterPlayer.StarterCharacterScripts["Aura!"]:WaitForChild("AuraModule"))
local playerID = {
58508301,
15454353,
2023345
}
AuraRemote.OnServerEvent:Connect(function(player, On)
local character = player.Character
local Humanoid = character.Humanoid
local HumanoidRootPart = character.HumanoidRootPart
if(On == true) then
print("Hey I printed!");
local found = false;
for i, v in pairs(playerID) do
if(v == player.UserId) then
warn("Yes")
AuraModule.UniqueAura(player.UserId, character)
AuraModule.Aura(player, player.UserId, character)
found = true
break
end
end
if(not found) then
warn("No!")
AuraModule.Aura(player, player.UserId, character)
task.wait(1)
warn("Awakened")
end
else
AuraModule.TurnOffAura(player, player.UserId, character)
warn("Normal Form")
end
end)
```
Sorry for not specifying, I mean the module not the server script
Module script:
Haven’t really changed too much yet
ocal replicatedstorage = game:GetService("ReplicatedStorage")
local aura = replicatedstorage.Aura
local Aura1 = aura.Aura1Effect:Clone()
local Aura2 = aura.Embers:Clone()
local EyeRedLeft = aura:WaitForChild("ParticleEmitterRedLeft")
local EyeRedRight = aura:WaitForChild("ParticleEmitterRedRight")
local Shineleft = aura.shineLeft:Clone()
local ShineRight = aura.shineRight:Clone()
local AuraBloom1 = aura.Aura1Bloom:Clone()
local AuraBloom2 = aura.AuraBloom2:Clone()
local playerID = {
58508301,
15454353,
2023345
}
local Module = { }
--(player, player.UserId, character)
function Module.Aura(player, UserId,Character)
local Head = Character.Head
local RightArm = Character["Right Arm"]
local LeftArm = Character["Left Arm"]
local LeftLeg = Character["Left Leg"]
local RightLeg = Character["Right Leg"]
local Torso = Character.Torso
local HumanoidRootPart = Character.HumanoidRootPart
--Attachments
local AttachmentLeft = Instance.new("Attachment")
AttachmentLeft.Position = Vector3.new(0.204, 0.221, -0.6)
AttachmentLeft.Name = "AttachmentLeft"
AttachmentLeft.Parent = Head
local AttachmentRight = Instance.new("Attachment")
AttachmentRight.Position = Vector3.new(-0.192, 0.216, -0.6)
AttachmentRight.Name = "AttachmentRight"
AttachmentRight.Parent = Head
local SpecialPartAttachment1 = Instance.new("Attachment")
--SpecialPartAttachment1.CFrame = HumanoidRootPart.CFrame * CFrame.new(0,-2.32,0)
SpecialPartAttachment1.Name = "SpecialPartAttachment1"
local SpecialPartAttachment2 = Instance.new("Attachment")
--SpecialPartAttachment2.CFrame = HumanoidRootPart.CFrame * CFrame.new(0,-2.32,0)
SpecialPartAttachment2.Name = "SpecialPartAttachment1"
local SpecialAttachment3 = Instance.new("Attachment")
SpecialAttachment3.Name = "SpecialAttachment3"
local SpecialAttachment4 = Instance.new("Attachment")
SpecialAttachment4.Name = "SpecialAttachment4"
--SpecialAttachment3.CFrame = HumanoidRootPart.CFrame * CFrame.new(0,-2.32,0)
Aura1:Clone().Parent = RightArm
Aura2:Clone().Parent = RightArm
Aura1:Clone().Parent = LeftArm
Aura2:Clone().Parent = LeftArm
Aura1:Clone().Parent = Torso
Aura2:Clone().Parent = Torso
Aura1:Clone().Parent = LeftLeg
Aura2:Clone().Parent = LeftLeg
Aura1:Clone().Parent = RightLeg
Aura2:Clone().Parent = RightLeg
EyeRedLeft:Clone().Parent = AttachmentLeft
EyeRedRight:Clone().Parent = AttachmentRight
--Making a New Part
local AwakenAura = Instance.new("Part")
AwakenAura.Name = "AwakenAura"
AwakenAura.Parent = HumanoidRootPart
AwakenAura.Size = Vector3.new(1, 0.1, 1)
AwakenAura.Massless = true
AwakenAura.CanCollide = false
AwakenAura:Clone()
local weld = Instance.new("WeldConstraint")
weld.Part0 = HumanoidRootPart
weld.Part1 = AwakenAura
weld.Part1.Anchored = false
AwakenAura.CFrame = HumanoidRootPart.CFrame * CFrame.new(0,-2.32,0)
AwakenAura.Parent = HumanoidRootPart
weld.Parent = HumanoidRootPart -- NEED TO PARENT THE WELD TOO OR ITS GONNA FALL THROUGH THE MAP
SpecialPartAttachment1.Parent = AwakenAura
SpecialPartAttachment2.Parent = AwakenAura
SpecialAttachment3.Parent = AwakenAura
AuraBloom1:Clone().Parent = SpecialPartAttachment1
AuraBloom2:Clone().Parent = SpecialPartAttachment2
ShineRight:Clone().Parent = SpecialAttachment3
Shineleft:Clone().Parent = SpecialAttachment3
end
function Module.UniqueAura(player, UserId, Character)
Aura1.Color = ColorSequence.new(Color3.new(1, 1, 1))
Aura2.Color = ColorSequence.new(Color3.new(0, 0, 0))
EyeRedLeft.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
EyeRedRight.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
AuraBloom1.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
AuraBloom2.Color = ColorSequence.new(Color3.new(0.709804, 0.698039, 0.290196))
ShineRight.Color = ColorSequence.new(Color3.new(0.941176, 0.941176, 0.941176))
Shineleft.Color = ColorSequence.new(Color3.new(0.941176, 0.941176, 0.941176))
end
function Module.TurnOffAura(player, UserId, Character)
if not Character then return end
local AwakenPart = Character.HumanoidRootPart.AwakenAura
Character.Head.AttachmentLeft:Destroy()
Character.Head.AttachmentRight:Destroy()
for _, Decendant in pairs(Character:GetDescendants()) do
if Decendant.ClassName == "ParticleEmitter" then
Decendant:Destroy()
AwakenPart:Destroy()
end
end
end
return Module
Sorry bro, got homework to do. Will answer tomorrow!
Ok I got to go to bed so thats alright
Hey did you start it yet? I was just checking up