cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Quasi i don't think you understand how CFrames work.
"Say, we wanted our top face to point towards a specified position...
we would do cf = CFrame.new(posn, posn + Vector3.new(0,1,0))"
That would make the front surface look up, making the top surface look either left OR right (depending on the implementation).
The actual solution would be to use the cross product.
You set the specific basis vector you want to the direction you want it to face ((lookAt-pos).unit) and compute the other basis v... |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Well the CFrame itself consists of the rotation and a translation, if you zero-out the translation you're left with a sort of "raw rotation matrix" (for lack of a better term):
cf - cf.p |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
I actually didn't read the rest (and still haven't) so maybe I jumped the gun and took that out of context. mb if so |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
new lua threads, yes
not actual process threads
similar to coroutines except they're automatically registered with roblox's thread sched. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
BodyThrust is already relative to the orientation so no don't set it to a multiple of lookVector. Set it to a multiple of (0, 0, -1). Or use BodyForce (pmuch ########## ### ##### a world-space force vector) |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
"your all stupid"
Now I remember why I love this forum |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
"I don't have a front page game but I've studied the Lua VM in depth, and the majority of front page devs likely don't even know what that is."
It's cute people think that's cool.
Anyone can learn how the Lua VM works in a day or two. But what a lot of (the good) front page games have is applied math which is not only more useful to know, but that knowledge extends everywhere not only Lua.
Good programmers know the Lua VM.
Great programmers know math. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
WHAT ARE THOSE
BACON HAIR, BACON SHOES
LMAO BRO U UGGERS |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
"I'm fighting to get Roblox to return nil when an Instance isn't found.
workspace.DoesntExist --> DoesntExist is not a valid member of Workspace"
As nice as that sounds, it's better how it behaves now.
Since properties are indexed first, if the expression yielded nil how would we know if it was the property that was nil or the child? The obvious answer would be "hey we know what all the properties of the object is" but nobody really does. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
OP and people like him are the reason the scripters forum is cancer.
They make the average IQ diminish significantly. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
s33vy you're worse than most of the people here, don't kid yourself. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
> Says something stupid
> Everyone calls him out
> "GUYS IT WAS JUST ME BAITING"
This happens all the time, and I was far smarter than you when I was 11. And that's saying something considering how stupid I am.
It's cute you think you come near half the regulars on this forum, because you don't and probably never will. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
That someone is stupid, it won't solve anything.
That warning is simple. Destroy (which is what Debris calls anyways) happens to lock the parent to nil. Somewhere else you're trying to set the parent after it's been destroyed. That's all. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
I don't understand why you people take things so personally.
First of all, yes it is simple. Not simple as in obvious but simple as in easy to figure out. The wiki says "[Destroy] locks the parent property" after its set to nil (http://wiki.roblox.com/index.php?title=API:Class/Instance/Destroy) and the error is very clear. "The Parent property of X is locked, current parent: NULL, new parent Y".
When something is locked it means it cannot be changed (as the name implies).
Therefore it is very ... |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
"This is literally just moving a Particles instance from a part to workspace."
If that's ALL you're doing, then you wouldn't be getting this warning.
You've posted no code, and 99.99% of the time someone has a problem it's that someone's fault. So the obvious route for any sane person to take is to assume you're doing something wrong because chances are, you are. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
It'll also get the service by its ######### instead of by name. So if you renamed the Players service, game.Players would error but game:GerService("Playaers") would give you the service |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Stop claiming the wiki. It’s not wrong.
local x = Instance.new(“Part”,workspace)
x:Destroy()
x.Parent = workspace
Why are you people so stubborn. Just because you don’t understans something this simple it doesn’t make the wiki wrong. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Stop blaming* the wiki |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
The problem is your fake humanoid object is being propogated as the “self” to the real GetChildren method.
So it ends up doing script.GetChildren(fakeHumamoid) and since it isn’t an actual instance Roblox just spits out that error since self isn’t an instance.
To solve this you’d have to do something like
__index = function(self, key)
local value = CustomProperties[key]
if type(value) == “function” then
return function(_, ..,)
return value(realHumanoid, ...)
end
end
end
Y... |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
😂😂😂 |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
No you implemented it wrong, you're still passing a FAKE OBJECT to a REAL ROBLOX METHOD.
Read what I put.
If you want to index script first, create an object to force __index to fire then just index the script first (with pcall in the case the member doesn't exist). |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Not sure what's more stupid, the fact the OP is looking for a physicist or he used the plural form of physicist when he used "a" before. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Here's a snippet from my Number Library module:
--- string number.format(number num, number idp = 0, boolean truncate = false, table suffix_list = default_suffix_list)
-- formats a number and leaves `idp` decimal places in the resulting mantissa and uses `suffix_list` for suffixes
-- if `truncate` is true, float format specifier (%f) not used to enforce truncation instead of rounding
function number.format(num, idp, truncate, suffix_list)
idp = idp or 0
suffix_list = suffix_list or number.def... |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
Typically you'd want to move them in the direction you're facing, not just either up, straight, or down.
But essentially
local lookY = cam.CFrame.lookVector.Y
if lookY <= -0.5 then
-- go straight down
elseif lookY >= 0.5 then
-- go straight up
else
-- go straight
end |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
It does work, but I'm not going to spoonfeed you further into doing this. The method I take works, the "hard"/mathy part is done. It's your job to figure out how to use it.
|
|