Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Easter egg script not working? Your title should be specific! Describe your problem concisely.

Nevermind I fixed it, I just didn't need RemoteEvents So, I have this script where if you touch a door, it will play a knock knock sound, then after one second it explodes. Except it is not working. I am confused.

--Play sound script
local debounce = false

script.Parent.Touched:connect(function(hit)
if not debounce then
debounce = true
if(hit.Parent:FindFirstChild("Humanoid")~=nil)then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local sound = script.Parent.Knoc --Removed space before end quotation mark
sound:Play()
wait(1)
script.Parent.WaitKid.Disabled = false
wait(30)
script.Parent.WaitKid.Disabled = true
end
debounce = false
end
end)

--local scriipt (isnide part)
local Remote = game.ReplicatedStorage:WaitForChild("EastEgg")

wait(1)
Remote:FireSever()


--SSS script
game.ReplicatedStorage.EastEgg.OnServerEvent:connect(function(plr)
	local east = game.ReplicatedStorage:WaitForChild("EastEgg")
	east.Disabled = false
	wait(1)
	east.Disabled = true
end)


2 answers

I also get the error EastEgg is not a vaild member of ReplicatedStorage

2 comments

0

Theres is two possible reasons. First one being that the object hasnt loaded make sure you use waitforchild and the second is that Eastegg is misspelt or is not in replicatedtorage.

0

I am using WaitForChild

Try this:

--Play sound script
debounce = false

script.Parent.Touched:connect(function(hit)
if not debounce then
debounce = true
if(hit.Parent:FindFirstChild("Humanoid")~=nil)then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local sound = script.Parent["Knock Knock"] --Removed space before end quotation mark
sound:Play()
wait(1)
local remote = Instance.new("RemoteEvent")
remote.Parent = game:GetService("ReplicatedStorage") --Changed to getservice
remote.Name = "EastEgg"
wait(30)
end
debounce = false
end
end)

Not completely sure but it might work.

2 comments

0

Doesn't work :(

0

Doesn't work :(

This discussion is preserved as it was. New answers, comments, and votes are closed.