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 5 years ago
Edited 5 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 — 5y
0
please read the tos before posting dagamer Dan_PanMan 227 — 5y
0
tos? Dagamer12345ert 5 — 5y
0
terms of service NoahsRebels 99 — 5y

3 answers

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

Let me give you an idea of what to do:

01local Player = game:GetService("Players").LocalPlayer
02local Mouse = Player:GetMouse()
03local Rep = game:GetService("ReplicatedStorage")
04 
05local Part = workspace.Part -- the part we are looking for
06 
07Mouse.Move:Connect(function()
08    if Mouse.Target == workspace[Part] then -- if the mouse's target is the part in the workspace
09    local event = Rep.Event -- the event you are firing
10 
11    event:FireServer()
12    end
13end)

Now the OnServerEvent is up to you to figure out.

Log in to vote
0
Answered by 5 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