What are you working on currently? (2023)

Cool! By the way, you don’t have to use pcalls for checking for potentially nil parts:

pcall fixes

RemainingTries = 5

while RemainingTries > 0 do
			success = pcall (function()
				char	= player.Character
				HRP		= char:FindFirstChild("HumanoidRootPart")
			end)

			-- Break the loop early if the player's character is found without errors.
			if success and char then
				RemainingTries = 0
				break
			end
			task.wait(0.075)
		end

^^ this can be shortened to vv

while RemainingTries > 0 do	


	HRP = player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") -- This pretty much means if player, and if player.Character, then if player.Character:FindFirstChild("HumanoidRootPart") then return it
	
	-- Break the loop early if the player's character is found without errors.
	if HRP then
		RemainingTries = 0
		break
	end
	task.wait(0.075)
end

Same thing with this:

success = pcall (function()
					HRP		= npc:FindFirstChild("HumanoidRootPart")
				end)

can be shortened to:

HRP = npc and npc:FindFirstChild("HumanoidRootPart")
1 Like






20 Likes

That’s a good tip! What happens if it finds the player’s character but doesn’t find their HumanoidRootPart, though? Does it return the Character or just nil?

I’ve updated the function to use my experience’s CharacterStorage “system”, so that code’s now pretty much completely different now. This advice/tip could be useful for CharacterStorage, though, since that “system” tries to quickly get references to character models, body parts, and other instances many times. I don’t know if that script uses a pcall, though.

-- RemainingTries = 5
		
		if player:GetAttribute("CharacterGUID") then
			entry = CharStorage:GetDictionary(player:GetAttribute("CharacterGUID"), false)
			
			if entry then
				-- Is this Player within the requested number of studs of the door? They're in the way if that's the case! Break the loop here.
				if entry.Character and entry.Humanoid.RootPart and (entry.Humanoid.RootPart.Position-_reference).Magnitude <= _radius then
					IsClose = true
					break
				end
			else print("IsCharacterNear:", player.Name, "doesn't have a CharacterStorage entry yet. Skipping!")
			end
		else print("IsCharacterNear:", player.Name, "hasn't been given a GUID yet. Skipping!")
		end

Started my latest project, mostly placeholders, lighting isn’t complete, and missing 70% of the details, but this is it so far!


16 Likes

Modeled new maple tree

image

30 Likes

In the code I provided, it would return nil

You can also do or, if, then, else, etc. These are called ternary expressions, and are like if statements on one line.

Currently working on an update for my horror game! Heres the icon for it currently.

1 Like

And now onto making rocks painting with my mouse. Anyways, what do you think of the trees? Spent a couple days improving them lots.

12 Likes

Just bored so made in Figma a Login Page Design! What do you think?

12 Likes

That looks great and thanks for mentioning Figma - I had not heard of that and it looks useful!

we do a little password creation :wink:

it’s this game if you don’t know

8 Likes

It is really helpful to make a design for a webpage. It’s free, there are enough tutorials online to watch to understand Figma. You can use it in a browser or just in their desktop app!

2 Likes

Model of the Day 75
Wide white drawers




Portfolio: Kristina's Portfolio

4 Likes

Grid-based combat system? :eyes:

edit: wrong reply.

7 Likes

After I added that “safety precaution” feature to the door on the counter, I decided to work on the rest of the restaurant a bit. I’ve mainly just added a couple new walls, changed their texture size to actually fit their apparently 11-stud height. (Is that a good height for public places’ rooms? They’re usually like twice the height of a human.)

…but there’s another addition; Thanks to @stravant’s model mirroring/reflecting plugin, I could easily clone the left-side entrance to make its mirrored counterpart on the right side! (I’m amazed that it even cloned and properly corrected the doors’ attachment references, too.) Here’s a couple pictures of how it all looks, though these were taken while it was raining.




Oh, and now there’s also a small light above each entrance, mainly there to add that extra bit of mood when you’re standing outside the restaurant at night, as shown in this picture.

5 Likes

new train for my game


still wip, i expect it to be done on the 24th

2 Likes

Tediously adding parts to all 49 keys of my skinned keyboard mesh. Why am I doing this? Well, I’d like it to be playable in VR, even if you’ll only be able to press one key with each hand.


And…done!

2 Likes

A skateboard game:

1 Like

Just the Game Thumbnail Nun too much :slight_smile: Its coming out soon tho.

11 Likes

I tried making radial motion blur for the vehicles wheels. Honestly doesn’t look too bad imo

13 Likes