How do you make an eggmin launcher?

I have always wanted to make an admin egg launcher gear like the one in all egg hunts before, where it launches an egg, and when a player touches the egg it awards a badge (only the first person who touched it gets it and then the egg disappears), how can I make one? Also is it possible if I replace the egg launched with (for instance) a hat or any other part?

2 Likes

It’s kind of difficult to explain but I might be able to rig something up for you. Keep in mind it won’t be very optimized so you may have to do that yourself but I can make the cannon. Just give me a little while. :+1:

1 Like

No worries take your time, I appreciate the help. Thank you very much!

1 Like

Ok I think I’ve finished it. It might not be the best cannon in the world but it works. Instructions are imbedded in the script.
If you have any questions or need help let me know and I’ll be happy to help!

EggminCannonDevForum.rbxl (30.7 KB)

EDIT: Wait hold on I forgot to add the badge part. Sorry lol

1 Like

Alright I fixed it! Here you go!

EggminCannonDevForum.rbxl (31.5 KB)

2 Likes

https://www.roblox.com/catalog/709229848/ROBLOX-Egg-Launcher-2017
https://www.roblox.com/catalog/1532311127/Eggmin-Launcher-2018
https://www.roblox.com/catalog/3039392931/Eggmin-Launcher-2019
https://www.roblox.com/catalog/4771619789/Eggmin-Cannon-9000

Have you looked into their scripts?

You can insert them into your game via the following script.

local insert = game:GetService("InsertService")
local loadAsset = insert.LoadAsset

local eggminLaunchers = {709229848, 1532311127, 3039392931, 4771619789}

for _, eggminLauncher in ipairs(eggminLaunchers) do
	local success, result = pcall(loadAsset, insert, eggminLauncher)
	if success then
		if result then
			result.Parent = workspace
		end
	else
		warn(result)
	end
end
1 Like

It looks so cool thank you so much!

Thanks for the advice, one more question though, now I do understand that the item launched is the egg, how do I make it award a badge when it’s touched though? (I’m testing this on the Eggmin Cannon 9000 gear if that helps make things clear).

Also if I want for instance to add sparkles to the egg being launched, how do I make that?
Sorry for asking a lot.

Added sparkles.

Removed the link.

1 Like

Thank you so much! Just one last thing, how do I make it so when you touch the launched egg you are awarded a badge?

I apologize for asking a lot I’m a horrible scripter lol.

local BadgeService = game:GetService("BadgeService")
local TweenService = game:GetService("TweenService")

local CollectableEgg = {}
local methods = {}
CollectableEgg.__index = methods

local badgeId = 0

function methods:Destroy()
	self.Destroyed = true
	self.Part:Destroy()
	for _, tween in pairs(self.Tweens) do
		tween:Destroy()
	end
end

function methods:Collect(player)
	BadgeService:AwardBadge(player.UserId, badgeId)
end

Replace the start of the ModuleScript’s code with this code, change badgeId to the ID of the badge you intend to award.

1 Like

You’re a literal hero, thank you so much!!

adminlauncher.rbxm (35.2 KB)

For anyone else that might need this.

2 Likes

Sorry for asking a lot, I get this error and it doesn’t award the badge, what could the problem be?

Screenshot_7

My bad, minor spelling mistake, should be BadgeService not BagdeService.

I’ve updated the model file’s link above.

1 Like

Also my bad for not noticing even though I checked the spelling lol, Thanks so much!!

Hello, I know this has been solved but is there anyone you can switch the launched part to a model? I’m struggling on how to make it work out with a model.

Maybe try unioning the model. Alternatively, you could try putting all the parts inside of one and welding them all together.