Hi, I’m trying to build an app in which a rectangle changes its width depending on the speed of the device.
I’ve written some code, but it doesn’t work. Here it is.
local function onSpeed ()
if event.speed = event.speed + 0.001 then
rectSpeed.x = rectSpeed.x + 1
end
–rectSpeed is the rectangle