I have this localscript put in the character to detect when the key "v" is pressed. There are a plethora of problems it causes, other players can't see the change in skin color, and the main part of the script won't work either. It might be because i put it in the character and not player, how do I detect key presses in a serverscript and not localscript?
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local char = script.Parent
local inputservice = game:GetService("UserInputService")
mouse.KeyDown:connect(function(key)
if key == "v" then
if char.Role.Value == "Vampire" and char.BeastMode.Value == false then
char.BeastMode.Value = true
char.Head.Color = Color3.new(0.74902, 0.74902, 0.74902)
char.Torso.Color = Color3.new(0.74902, 0.74902, 0.74902)
char["Left Arm"].Color = Color3.new(0.74902, 0.74902, 0.74902)
char["Left Leg"].Color = Color3.new(0.74902, 0.74902, 0.74902)
char["Right Arm"].Color = Color3.new(0.74902, 0.74902, 0.74902)
char["Right Leg"].Color = Color3.new(0.74902, 0.74902, 0.74902)
end
print("Beast Mode!")
end
end)
