i noob in roblox lua and i can only change (local)script a bit to it start work =(
This here would only work for players (unlike ImAnons post) Change workspace.Part to your doors location.
local players = game:GetService("Players") local part = workspace.Part local w = false part.Touched:Connect(function(hit) if w then return end if players:GetPlayerFromCharacter(hit.Parent) then -- Gotta check if it is a player touching w = true part.Transparency = .6 wait(3) part.Transparency = 0 w = false end end)
(an upvote would be appreciated)
make sure you put script on the part not localscript because if you put localscript other peole can't see that its transparent. if this works please accept my answer! hope this help too!
local part = script.Parent local debounce = true --for delay part.Touched:Connect(function() if debounce == true then --if debounce = true then part.Transparency = 1 --part transparent to 1 you can change the value what you want wait(3) --wait 3 sec part.Transparency = 0 --part transparent to 0 so you can see it again end end)
Closed as Non-Descriptive by Just2Terrify and hiimgoodpack
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?