Can anyone explain to me why this is happening?
local uis = game:GetService("UserInputService")
uis.InputBegan:connect(function(input,gp)
if input.UserInputType == Enum.UserInputType.Keyboard and (not gp) then
if input.KeyCode == Enum.KeyCode.Left then
script.Parent.Value = -1
end
end
end)
uis.InputEnded:connect(function(input,gp)
if input.UserInputType == Enum.UserInputType.Keyboard and (not gp) then
if input.KeyCode == Enum.KeyCode.Left then
script.Parent.Value = 0
end
end
end)
uis.InputBegan:connect(function(input,gp)
if input.UserInputType == Enum.UserInputType.Keyboard and (not gp) then
if input.KeyCode == Enum.KeyCode.Right then
script.Parent.Value = 1
end
end
end)
uis.InputEnded:connect(function(input,gp)
if input.UserInputType == Enum.UserInputType.Keyboard and (not gp) then
if input.KeyCode == Enum.KeyCode.Right then
script.Parent.Value = 0
end
end
end)

5 comments
Is this in a script or localscript
@XAXA This is a local script. It also says that in the title.
Try moving the localscript to workspace.
@leadfordead2 The localscript is not supposed to be in Workspace though.
I found out my problem! I just had two scripts utilizing userinput service asigned to the same button! I just need to put all of my code pertaining to that in one LocalScript. THANK YOU SO MUCH! @XAXA