Why do only two of my notes work?

My down and left notes are the only ones that work.

local uis = game:GetService("UserInputService")
local magnitude

game:GetService("RunService").RenderStepped:Connect(function()
	script.Parent.Position = script.Parent.Position + UDim2.fromOffset(0,-10.5)
	magnitude = (script.Parent.AbsolutePosition - game.Players.LocalPlayer.PlayerGui.ScreenGui.ClipBar.AbsolutePosition).magnitude
end)

uis.InputBegan:Connect(function(key, processed)
	if magnitude < 502 then
	    if key.KeyCode == Enum.KeyCode.S or key.KeyCode == Enum.KeyCode.Down then
			print("a doo doo")
			game.SoundService.Hit:Play()
			script.Parent:Destroy()
		end
	end 
end)

wait(3)
script.Parent:Destroy()

Why is this?

image

I tried to fix it by disabling it.

1 Like

Am I blind? You’re only implementing just 2 keybinds when fired

If I can see correctly, the other localscripts probably have the other actions there, @IcyDivi could you show us your right note script?

local uis = game:GetService("UserInputService")
local magnitude

game:GetService("RunService").RenderStepped:Connect(function()
	script.Parent.Position = script.Parent.Position + UDim2.fromOffset(0,-10.5)
	magnitude = (script.Parent.AbsolutePosition - game.Players.LocalPlayer.PlayerGui.ScreenGui.ClipBar.AbsolutePosition).magnitude
end)

uis.InputBegan:Connect(function(key, processed)
	if magnitude < 502 then
		if key.KeyCode == Enum.KeyCode[script.Parent.Key.Value] then
			print("a doo doo")
			game.SoundService.Hit:Play()
			script.Parent:Destroy()
		end
	end 
end)

wait(3)
script.Parent:Destroy()

They are all the exact same. They still don’t work.

What are you setting in the Key value? Could you show us the one for the Up image?

It’s set as W.

asdasasdasd. . . . .