I am trying to make a function where you turn invisible if you press q and I made everything else but changing the players transparency doesn't work the script:
local Player = game.Players.LocalPlayer
local plr = script.Parent.Parent.Transparency
local dmg = true
local cooldown = false
local TransparencyI = true
game:GetService("UserInputService").InputBegan:connect(function(input, gamepor)
if (input.KeyCode == Enum.KeyCode.F or input.KeyCode == Enum.KeyCode.ButtonY) and TransparencyI == true and cooldown == false then -- dont touch
plr = 1
wait(40)
plr = 0
TransparencyI = false
cooldown = true
wait(60)
TransparencyI = true
cooldown = false
end
end)

4 comments
I tried it and it says "Transparency is not a vaild member of Workspace.KEVINRUANO)
Incorrect.
it works, you have a different problem now. as ludzik mentioned below you cannot turn a model transparent on its own. you will have to loop through each part and set its transparency.
Ok that makes sense let me try it