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?
print("sub2_creeper_pro12") local function = function.new = 5 if 5 = nil then do end) end) end
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.