hey guys im new to roblox scripting. so im trying to make a script so when you click the mouse is opens a door but you have to hold the mouse down. is there anyway to make it so i dont have to hold?
COMMUNITY QUESTION
How do i make a tool where i just have to click not hold to make something work?
1 answer
local plr = game.Players.LocalPlayer
local doorname = script.Parent --If the script is the child of your door
local mouse = plr:GetMouse()
mouse.Button1Down:connect(function()
doorname.Transparency = 0.5
doorname.CanCollide = false
wait(5)
doorname.Transparency = 0
doorname.CanCollide = true
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
We only help with Already existing Scripts.
please follow https://scriptinghelpers.org/help/how-post-good-questions-answers