Before you start you should write code that is bootable least because I lost a bit of time to re-create the missing parts. That said I am attaching the code that I created, it is like your but I added the missing parts and changed some of coordinates for my tests. Essentially the mistake was to create the joint as a parameter before passing the character and then the platform (to be done the other way).
Also they needed to be repaired the coordinates of the joint. Finally if you want the character does not rock you set myJoint.maxLength = 0. I attach the code:
local physics = require "physics" physics.start() local platforms local character local function movePlatforms(obj) local nowX = obj.x transition.to(obj, {time = 5000, iterations = 0, x = nowX+200, transition = easing.continuousLoop}) end -- Collision function onCollision(self, event) if (self.myName == "maincharacter" and event.other.myName == "platform") then -- Trigger collision event character.currentPhase = "grounded" timer.performWithDelay(10, function() myJoint = physics.newJoint( "rope", platforms, character, 0, -(character.height/2)-(platforms.height/2), 0, 0 ) myJoint.maxLength = 0 end, 1) end end -- Character creation function createCharacter() character = display.newImageRect("character.png", 40, 51) physics.addBody(character, "dynamic", {bounce = 0.0, friction = 1, density = 1}) character.isBullet = true character.x = 50 character.y = 250 character.isFixedRotation = true character.myName = "maincharacter" character.collision = onCollision character:addEventListener( "collision", character ) character.currentPhase = "grounded" --camera:add(character, 1, true) return character end local character = createCharacter() -- Platform creation function createPlatforms() local platforms platforms = display.newImageRect("platforms.png", 100, 22) physics.addBody(platforms, "static", {bounce = 0.0}) platforms.x = character.x platforms.y = character.y+(character.height\*.5)+20 platforms.collision = onCollision platforms:addEventListener("collision", platforms) platforms.myName = "platform" --camera:add(platforms, 2, false) movePlatforms(platforms) return platforms end platforms = createPlatforms()