#How do you get a new position from a part, increase it by 10 (based on orientatantion)

1 messages · Page 1 of 1 (latest)

lapis heron
#

So pretty much im using tween service and want to tween a part forward by 10 studs

#

so for example i have this arrow which shows the direct that its facing, so on a rotate i wouldnt manually be able to add 10 to x it would be either - or y so im unsure how to go about this

narrow burrow
#

what have you tried so far?

lapis heron
narrow burrow
#

you seem to have that problem a lot

lapis heron
#

i do indeed

#

i only ask here if im like struggling

#

as these kinds of issues im not sure on

narrow burrow
lapis heron
#

im guessing that you would have to get the orientatantion anyway but then how do you use that

narrow burrow
# lapis heron So pretty much im using tween service and want to tween a part forward by 10 stu...

this specific problem is just getting a direction vector like cframe.lookvector, which is simple enough and you probably could have figured that out with some googling https://www.google.com/search?q=roblox+how+to+make+a+part+move+10+studs+based+on+orientation --> https://devforum.roblox.com/t/how-do-i-make-a-part-move-relative-to-its-rotation/2179031

lapis heron
#

ahh right thank you

narrow burrow
# lapis heron im guessing that you would have to get the orientatantion anyway but then how do...

google is your friend, youtube too, and the docs https://www.youtube.com/watch?v=Vmphd-361qk

Need to rotate a hinge to face a specific object? Need to find whether or not someone is in your NPC guard's field of view? Vector Angles are here to help! Roblox has a nifty method to find the angle between two Vector3s, and I show you how and why to use it in this video. Hope you Enjoy!

Vector3:Angle() docs: https://create.roblox.com/docs/ref...

▶ Play video
lapis heron
#

ahh right okay thank you

#

sorry about this

#

i knew it was simplier then some of the other issue i have faced

narrow burrow
narrow burrow
#

then you wouldn't get stuck so often ;p

lapis heron
narrow burrow
#

i think you're overcomplicating it for yourself

#

like you're thinking in the high-order of code, rather than the implementation details. kinda like, "oh just make a killbrick that kills players whenever they touch it", but in the actual implementation, you need to run through all sorts of little things like collectionservice for all the bricks, touch event, filter for player.character, search for humanoid, and then there's 4+ ways to kill the humanoid (.health=0, :takedamage(.health), changestate(dead), neck:destroy(), and there's probably more like just player.character:destroy).

lapis heron
#

oh right

#

i mean my guess is that for that issue i could just move the weld right?

#

that controls the length of the texture

narrow burrow
narrow burrow
lapis heron
#

if you understand what i mean

lapis heron
#

i kinda just go into all this raw

narrow burrow
lapis heron
#

i use previous knowleage from other languages and just put it together and just dig in deep. Dont get me wrong its a bad idea but its fun and i learn a lot along the way

lapis heron
lapis heron
#

but the small things that are exlucive are the stuff that im struggling with

narrow burrow
# lapis heron but the small things that are exlucive are the stuff that im struggling with

you may be familiar with the keep it simple, stupid and it applies a lot to programming. most problems are simple, and you'll feel stupid when you figure them out, and that never changes with code. one you may not be familiar with is rubber duck debugging which you may have inadvertently experienced but didn't know it actually has a name ;p

KISS, an acronym for "Keep it simple, stupid!", is a design principle first noted by the U.S. Navy in 1960. First seen partly in American English by at least 1938, KISS implies that simplicity should be a design goal. The phrase has been associated with aircraft engineer Kelly Johnson. The term "KISS principle" was in popular use by 1970. Variat...

In software engineering, rubber duck debugging (or rubberducking) is a method of debugging code by articulating a problem in spoken or written natural language. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, l...

lapis heron
#

ohh right this makes much more sense

narrow burrow
# lapis heron but then if so that leads to another issue of how do i make sure that i expand t...

if you were to explain your conveyor belt texture problem to a rubber duck, it would probably be something like you have 2 conveyor belts next to each other with a moving texture and the textures don't line up. the next obvious question is what would it take to make the textures line up? and the obvious answer is they need to be the same texture, repeating pattern, and moving in the same direction at the same rate with the same starting position, so that they are all showing exactly the same texture except moving.

#

the problem, and its solutions, becomes obvious, if you keep asking yourself the most obvious questions

lapis heron
#

ahh right thank you man

narrow burrow
#

if you weren't sure about setting up all that texture stuff, keep asking the dumb questions like what is a texture, how does it show on a part, how to make it move, etc. it takes a long time to learn all these little tricks, but i can guarantee you the first trick of rubberduck debugging can be used to make practically anything, even if you've never made it before or seen it before salute good luck with your game