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

How do i make a part dissapear 2 seconds after looking at it?

I'm bad with coding. yep, but when i code games its usually code from the internet, but i cannot find any code that makes a part dissapear 2 seconds after looking at it, tryna make a horror game here guys! any code that works would be appreciated! also would it work with humanoids?

4 comments

0

hmmm. I think you use mouse.Target.Position

0

please read the tos before posting dagamer

0

tos?

0

terms of service

3 answers

print("sub2_creeper_pro12")

local function = function.new = 5
if 5 = nil then
do
end)
end)
end

3 comments

0

:|

0

you need to ban jayden

0

ow my brain

Let me give you an idea of what to do:

local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local Rep = game:GetService("ReplicatedStorage")

local Part = workspace.Part -- the part we are looking for

Mouse.Move:Connect(function()
    if Mouse.Target == workspace[Part] then -- if the mouse's target is the part in the workspace
	local event = Rep.Event -- the event you are firing

	event:FireServer()
    end
end)

Now the OnServerEvent is up to you to figure out.

look on the internet how to detect a player looking at something. then just wait 2 seconds and make it disappear.

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