local userInputService = game:GetService("UserInputService")
local character = script.Parent
userInputService.InputBegan:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.W then
character.Position += UDim2.new(0, -1)
end
if input.KeyCode == Enum.KeyCode.A then
character.Position += UDim2.new(1, 0)
end
if input.KeyCode == Enum.KeyCode.S then
character.Position += UDim2.new(0, 1)
end
if input.KeyCode == Enum.KeyCode.D then
character.Position += UDim2.new(-1, 0)
end
end)
I’m not sure if you completely fixed it, but based off what you posted, you could try:
local userInputService = game:GetService("UserInputService")
local character = script.Parent
userInputService.InputBegan:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.W then
character.Position += UDim2.new(0,0, 0,-10)
end
if input.KeyCode == Enum.KeyCode.A then
character.Position += UDim2.new(0,-10, 0,0)
end
if input.KeyCode == Enum.KeyCode.S then
character.Position += UDim2.new(0,0, 0,10)
end
if input.KeyCode == Enum.KeyCode.D then
character.Position += UDim2.new(0,10, 0,0)
end
end)
It was moving before, but because of how you had your values it was moving way too far and going off-screen.