Feedback on obby lava scripting tutorial

This isn’t really a scripting question and I don’t think that this belongs anywhere on the dev forums, but it’s scripting related. I’m looking for feedback on a scripting tutorial that I made. The goal of the video is to explain in English words how a lava block works.

I’m looking to get feedback because I want to create a full scripting tutorial and I want to know how my explaining skills are before I create that.

If there’s a category for this or if this breaks the tos, please tell me and I’ll take it down.

7 Likes

You can’t assume that the touching part in your Touched listener has a parent.

1 Like

if you are trying to find out if it is a character then yes, since the parts in the character model is its children all the time. @inoobe_xi the video is great it gives the audience good information, teaches them, and has good entertainment as well. I think next time you should type it out and explain it, especially for things that are big. That is what I always do and I believe it seems to help people more. It is your opinion though, keep it up!

2 Likes

No. You don’t know that an object that touched the lava has a parent in the listener. You need to check if hit.Parent is nil. If you don’t know this, you are unqualified to make tutorials for anyone. In terms of style the tutorial is fine, though.

2 Likes

From the api reference for Workspace:

Objects not descending from Workspace will not be rendered or physically interact with the world.

If a part is not a descendant of the Workspace (i.e. if its parent is nil) it will not trigger any Touched events in the first place. Even so, passing nil into :GetPlayerFromCharacter will still cause it to return nil, just as it would if you passed an instance that isn’t a player character.

2 Likes

When an event occurs, the listener is not run immediately. When the part touches the lava, you know that it has a parent. When the listener is running, you do not.

I don’t know why you’re pointing out that Players:GetPlayerFromCharacter() will work when the argument is nil. The problem is accessing a method on hit.Parent in the first operand to the and operator.

The Humanoid check is redundant but can error.

1 Like

Everytime I explain script.Parent I get worried because I’m not sure if the explanation is good enough. To scripters it would probably make sense but to non-scripters it might not. If you have friends that don’t script can you please ask them to watch the video so that I can get feedback from beginners?

1 Like

I wished you went more in detail to which script means and does, But the tutorial is pretty good!

1 Like