So I my start screen is integrated into a parallax background, and I want it to move when I move my mouse. How would I do this? I have already created script based off the Q&A answer here yet it doesn't seem to work
func _input(event):
if event is InputEventMouseMotion:
var screensize = get_viewport().size
var multiplier = 2
var motion_offset = 0
var mouse_x = event.position.x
var mouse_y = event.position.y
var relative_x = (mouse_x - (screensize.x/2)) / (screensize.x/2)
var relative_y = (mouse_y - (screensize.y/2)) / (screensize.y/2)
ParallaxLayer.motion_offset.x = multiplier * relative_x
ParallaxLayer.motion_offset.y = multiplier * relative_y
Edit: With the answer provided I get the error saying "Invalid index 'motion_offset (on base: 'GDScriptNativeClass')"