#How do you get a new position from a part, increase it by 10 (based on orientatantion)
1 messages · Page 1 of 1 (latest)
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
what have you tried so far?
well im not sure where to start
you seem to have that problem a lot
i do indeed
i only ask here if im like struggling
as these kinds of issues im not sure on
this is something else
im guessing that you would have to get the orientatantion anyway but then how do you use that
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
ahh right thank you
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...
ahh right okay thank you
sorry about this
i knew it was simplier then some of the other issue i have faced
its fine
your other issues are fairly simple too, it's just you don't know about it, the fact that you can't find out for yourself is what bothers me, i think you're lacking something to teach yourself?
then you wouldn't get stuck so often ;p
true but like for example, https://discord.com/channels/448986884497211392/1367897438769250324, i have never seen anyone do this therefore no clue
yes that's a simple problem too, i'm pretty sure i know what it is but more details helps
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).
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
no what i'm saying is i think you're missing a few little concepts that will help you to get stuck far less often, and there's 2 i can think of on the spot that you probably never heard before.
you're on the right track with this
but then if so that leads to another issue of how do i make sure that i expand the part across others, don't go behind or diagonal or pass a non belt part
if you understand what i mean
i mean yeah i think so
i kinda just go into all this raw
i meant that you're breaking down the problem to smaller and simpler components, which is exactly what you need to do.
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
that helps a tonne
yeah right thats what i was thinking okay well ill try that
i mean knowleage of others does 100%
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...
ohh right this makes much more sense
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
ahh right thank you man
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
good luck with your game