Hey so I'm making a katana for a ninja and I want it to be stealthy. I want it so when you equip the Katana, and press 'v', you turn invisible for 10 seconds
I already tried, but the code doesn't work. Can someone help me out?
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local function onKeyDown(key)
if key == "v" then
print("v")
local c = script.Parent.Parent:GetChildren(c)
if c:IsA('Part') then
c.Transparency = 1
wait(10)
c.Transparency = 0
end
end
end

3 comments
https://developer.roblox.com/api-reference/class/UserInputService
https://developer.roblox.com/api-reference/event/UserInputService/InputBegan
Even if this works, you never even called the function