i ask studio because, i dont know how to script this. i am a beginner, still learning.
heres how i want things to work:
generate a bolt using only parts that extends out 103 studs in a random direction
give it the properties of: Neon, (Color3.FromRGB(255, 255, 255))
set its “Origin” to workspace.Core, its position being -649.633, 661.956, 246.006
parent said bolt to game.Workspace.CoreBeams
put an explosion at the end of the bolt (not at the origin)
after 0.3 seconds, delete the bolt
Yep also draw a flow chart on what you plan to happen similar to the one you did in your previous post.
Otherwise there is insufficient information here. No one will be able to help further unless these are explained further:
Define bolt further such as if its model or part. Is arc the shape of the model or projectile trajectory of how you want it to move?
Ok so it starts from the origin so you can obtain the initial position from workspace.Core if its a model or part the method to obtain it will be different.
Also you need to define the direction you want it to to go, up down left right, random, etc.
i want a bolt generated with a random arc using parts, with neon and white color properties, and generate an explosion 103 studs away from workspace.Core at the same position as the part of the bolt that reaches that 103 stud gap. i also want all these generated bolt parts parented to workspace.CoreBeams. also the direction will be completely randomized.
That was the key information that was missing. Now you can split up our system into 3 components.
Generating the bolt
Positioning the bolt
Parenting the bolt
Then you can do research to find resources as @hbgnhu said.
for 1 generating the bolt, I am assuming it’s a lightning bolt and not a machine part bolt
for 2 you could use trig, 103 studs away + random direction equals circle with a radius of 103.
number 3 is a simple .Parent property editing.
I will not probably respond anymore as this is an entire system which requires effort hope you can use this to get started on researching how to script the system.
Here is an example script in Lua (the programming language used in Roblox) that will create a bolt with a random arc, using parts, and have it move out 103 studs from the origin of the workspace:
The script creates a new “Part” object and sets it as a block shape. Then it sets the position of the bolt to the origin (0,0,0) of the workspace and sets the parent to the workspace. Then it randomly generates an arc for the bolt to follow and sets the CFrame. Finally, it creates an explosion “Part” object, sets its position to 103 studs away from the bolt, sets it as a ball shape, and sets the parent to the workspace.
This script will create a bolt and explosion when executed. However, it’s only a basic example and you may need to tweak and modify it to fit your specific needs.