Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 4 years ago
Edited 4 years ago

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?

0
hmmm. I think you use mouse.Target.Position VVoretex 146 — 4y
0
please read the tos before posting dagamer Dan_PanMan 227 — 4y
0
tos? Dagamer12345ert 5 — 4y
0
terms of service NoahsRebels 99 — 4y

3 answers

Log in to vote
0
Answered by 4 years ago
print("sub2_creeper_pro12")

local function = function.new = 5
if 5 = nil then
do
end)
end)
end
0
:| Block_manvn 395 — 4y
0
you need to ban jayden VVoretex 146 — 4y
0
ow my brain thebananashetoldyou 31 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

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.

Log in to vote
0
Answered by 4 years ago

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

Answer this question