You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to copy an “aura”(really just some parts all welded to one part) from rep storage to go around the player
What is the issue? Include screenshots / videos if possible!
The aura spawns in but it spawns where it would be in the studio instead of the around the player. The player is also stuck
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried working with the anchoring of the part but im not getting it
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local REM = game.ReplicatedStorage.RemoteEvents.Confience -- Confidence = the aura
local Aura = game.ReplicatedStorage.ToolParts.NeoConfidenceAura.Aura
REM.OnServerEvent:Connect(function(player)
local CP = Aura:Clone()
local Primary = CP.Gradient.Handle
local Weld = Instance.new("WeldConstraint")
Weld.Parent = player.Character.PrimaryPart
Weld.Part0 = player.Character.PrimaryPart
Weld.Part1 = Primary
CP.Parent = player.Character
CP.CFrame = player.Character.PrimaryPart.CFrame
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
Yeah, both our solutions worked, I tested it in studio. I wonder how changing it to position works though
Not sure if it will work for Astereaux though.
It’s because you’re welding the part before setting its CFrame. When changing the .Position property of the part, it doesn’t take into account the assembly so if you had more parts welded to that part, it would give you an offset. CFrame does take into account the assembly (the part welded to your character is considered an assembly) which is why the part didn’t move to your character.
Hello!
Yes the person who replied is correct. I tried your way of parent and cframe before the weld but the part just does the same thing minus freezing the character. When using the .Position @PatitoCeb used, It says I can’t use .Position because its a model. I tried just making the primary position but it didnt bring the parts with it
--Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remotes = ReplicatedStorage.RemoteEvents
local auraPart = ReplicatedStorage.ToolParts.NeoConfidenceAura.Aura
remotes.Confience.OnServerEvent:Connect(function(player : Player)
--Getting some useful variables
local character = player.Character
local humanoidRootPart = character.HumanoidRootPart
--Clones the part from replicated storage
local auraPartClone = auraPart:Clone()
--Default values just incase you've forgot
auraPartClone.Anchored = false
auraPartClone.Massless = true
auraPartClone.CanCollide = false
--Creates a new weld constraint
local weldConstraint = Instance.new("WeldConstraint")
weldConstraint.Parent = auraPartClone
weldConstraint.Part0 = auraPartClone
auraPartClone.Parent = character
auraPartClone:PivotTo(character:GetPivot())
--When you set the .Part1 of a weld constraint, it snaps and you're not able to change the offset. So do this at the end
weldConstraint.Part1 = humanoidRootPart
end)
That’s odd, have you tried messing with the Massless and CanCollide properties? There might be a problem with the welds, but I’m not so sure, also are the other parts welded with WeldConstraints?
I don’t think this would work because AuraPartClone in this case is the model. I critiqued the script to work a little bit (Switched the part 1 and 0 and made part 1 the primary part) but now it’s like the player is stuck to the aura parts ( cant move )
Edit: it turns out the reason it wasn’t working was because the spinning parts of the parts of the aura, im not really sure how to fix that so maybe ill make another post adressing the problem