Hello developers!
As you probably know, it is easter tomorrow!
Our family has this tradition where everyday, we go seek easter eggs together!
This year is a bit different for us, since my neices’ teacher has gotten the virus. My neice is not allowed to leave the house now, so we can not seek eggs together.
My mom got this (genius) idea tomorrow that I could maybe make a game where we can seek eggs together. Almost everyone in my family has got a roblox account so I thought this was a really good idea!
I can make every part of the game myself, other than a few scripts. That’s why I fugured to ask for help here!
What I need:
I need a script that puts a green text in the chat on touch of a part. The text will be this: [Username] found [Part name]!
The script then has to put the part’s transparency to 1, so the egg can’t be found again.
Only the touched part has to become transparent, because it can be possible that multiple parts have the same name. The script must only be able to be triggered once.
Update: With some help from free models I was able to create this:
local touchPart = workspace.TouchPart
local plrName = game.Players.LocalPlayer.Name
local debounce = true
touchPart.Touched:Connect(function(hit)
if debounce == true and hit.Parent:FindFirstChild("Humanoid") then
debounce = false
local name = hit.Parent.Name
game.StarterGui:SetCore("ChatMakeSystemMessage",
{
Text = ""..name.." has found an egg!",
Color = Color3.fromRGB(0, 255, 0),
Font = Enum.Font.SourceSansBold,
TextSize = 18,
}
)
debounce = false
end
end)
Which kind of works, but it relies on the name of a part and doesn’t make it disappear.