So I’ve been trying to make a lightning arc by filling blocks between 2 points and randomizing positions, but when I do this, it makes a scattered and non-nonsensical effect. How do I make the parts connect to the ends of eachother while still being correct?
The Usage section of the post is pretty self explanatory.
Pulled directly from the post, this shows exactly how to link the two parts with lightning. There also seems to be some pretty neat property modifiers that you can tinker with aswell.
local Arc = require(game.(...).Arc)
-- Make an arc between two static points with default colors:
local arc1 = Arc.new(
Vector3.new(10, 10, 0),
Vector3.new(-10, 10, 0)
)
-- Make a dynamic arc linked between two (moving) attachments:
local arc2 = Arc.link(
workspace.ArcStart.Attachment,
workspace.ArcEnd.Attachment
)
If you could, can you show me an example of it being in use(not in the other person’s thread) but in your own style? I’d like to see how it can be used because the snip bit you send in your post has little to no effect
Again, I don’t see how this isn’t something you can’t easily figure out yourself? The usage is pretty self explanatory. Even the default arc settings provide a pretty cool result.
local arc = Arc.new(
workspace.p1.Position,
workspace.p2.Position
)
I spent maybe the whole of 30 seconds messing the other properties to create an effect that looks something like what you were going for. You can very easily do the same to achieve the effect you want.
local Arc = require(game.ReplicatedStorage.Arc)
local arc = Arc.new(
workspace.p1.Position, -- position1
workspace.p2.Position, -- position2
Color3.fromRGB(0, 255, 255), -- main color (toothpaste)
Color3.fromRGB(0, 255, 255), -- second color (same as main)
1, -- number of arcs
5 -- thickness
)
I will admit I was slightly confused with using the module at first because I didn’t realize it was client sided (which is actually for the best as it won’t strain the server). I put this code in a LocalScript in StarterCharacterScripts.
From the Electric Arcs Effect Thread: "Please note that this is still somewhat on the performance-heavy side and may be an overkill kind of implementation for such an electricity effect, but the library does include auto-throttling and other tricks to make sure the frame rate stays as high as possible and no effort is wasted updating effects that are far away compared to those closeby. "
This module is strictly client-sided, as it is built to try and reduce strain on the game. I don’t see why this would matter. The player’s may see different arcs, but that shouldn’t really be a problem. Each client will be in charge of loading the arcs, and the developer said that the clients will try to increase performance as much as possible, something that can’t be done on the server for individual players.
I don’t see why you refuse to use a working script vs yours which you just said does not work. Buildthomas’ module was made to be as non performance heavy as possible. I don’t think you have an use case where his module would not work. If there’s something free, open source, and good, why not use it?
Alright well you will have to do a lot more scripting in that function. It’s a pretty complicated thing to do, and I’m not advanced enough for that. Hope you get it working though!
I fail to see how this is a bad thing. Open source modules like this are meant to be used because they perform a task that’s not easy to do.
You could’ve said this from the outset, instead of entertaining the idea of using the module.
If you’re really deadset on learning how to do this yourself, you can look at how the module is created to figure out how to go about your own method. I see you recently commented on an old thread that asks how a similar system is done. The solution offered is quite a good one, just create points between a start and end position and offset them slightly, and then connect them.