First, insert a brick into the place and put it at the entrance of the cave.
Make it invisible and CanCollide = false
Make a script, put it in the brick, and put this in the source
--Code
script.Parent.Touched:connect(function (hit)
plr = game.Players:GetPlayerFromCharacter(hit)
if plr.CaveMsg ~= nil then
plr.CaveMsg:Remove()
else
m = Instance.new("Message")
m.Parent = plr
m.Name = "CaveMsg"
m.Text = "Whoa, it's dark!"
end
end)
--End of code
|