So, being the logical but not entirely efficient coder I am, I compiled this little sinewave-based object according to what I assumed your demand is (jump-enabled in and out spikes). The code is here: (pre-hotfix please look down)
https://pastebin.com/8v18zg58The downfall as far as I can tell is that it doesn't properly transition if you jump fast enough, but it should never "break" or throw an error by any means. I'll get working on a better version, though. Tell me how you like the one I showed.
Edit: If they aren't going in and out fast enough to your liking, go to the sineAngle code and change the "+4" to a higher number, preferably between 10 and 15.
EditEdit: If you're using studio, there's gonna be some variable-related errors. If that happens, put in the Create Event as follows:
transitioning=0;
way=0;
sineAngle=0;
And that should be it..?
EditEditEditings!!!EditSuperEditVersionCyberHitBoxEdition:
I suppose I really should get better at actually thinking about what my stuff does. Okay, so set "way=1" in the creation CODE of spikes that are on the second wave of jumping, and copy THIS hotfix code instead:
https://pastebin.com/a0LmTW3q