This one’s a pretty odd case that’s got me stumped. I’ve got a Coin and Gem object that is spawned locally by NPC’s and assigned a random Velocity to fling it away from the starting spot. This works exactly as I’d expect when testing from studio, however oddly when launching the game from the site to test these orbs simply fall to the ground. Printing their velocities reveal that the velocity is still set, just not obeyed it seems. I’ve tried replacing the direct Velocity assignment with a body velocity and body force that’s destroyed a short wait() later, however this also leads to it simply dropping to the ground only in game.
The code looks essentially like this:
self.Orb = script:FindFirstChild(Type):Clone() self.Orb.Position = Position self.Orb.AlignPosition.Attachment1 = self.Character.HumanoidRootPart.RootRigAttachment if InitialVelocity ~= nil then self.Orb.Velocity = InitialVelocity end self.Orb.Parent = workspace Physics:SetPartCollisionGroup(self.Orb, "Entity")
The parts themselves is a non anchored can collide true part contained within the local script. The NPC’s they’re spawned inside also have all of their parts set to CanCollide false.The AlignPosition is disabled until the player gets into range for the magnet effect. Any ideas what might be causing this difference in behavior between testing in studio vs on site?
Second Edit: Well nevermind on that, it appears to be back to the previous behavior upon republishing.