Splitting a player in half wont work

why dont this work
im tryna make it so the space key is pressed and then a instance of split player creates but it doesnt

Just a quick question for clarification, when are you starting the timer before you are going into the space pressed events?

i start it at the beginning of the scene

have you tried moving the “Start Timer” on the 2nd event (where var=0) to the bottom of the list?

still nothing. it wont split apart

Just another idea (because I threw your code in a mock up and it works for me) could the ZOrder of the Spilt Player be behind another image (like a background) so it is creating but you aren’t seeing it? Maybe throw in a set Zorder of SpliPlayer to Player.ZOrder()+1?

Try this (obviously change out the names/param and add in the Attract)

i have the animation changing when the player splits so this is not the case, because the animation does not change

Oops, I may not have been clear, put all your stuff in there that you need, but make it not 2 subevents under one “Space Key pressed” but divide them into 2 separate events :slight_smile:

I haven’t tested the code but if it works for other people than either there’s a typo that we’re not seeing or there are other events or behaviors interfering with it.

Did you check the debugger? How many splitPlayer instances are showing? Your events only work if there are 0 or 1. Maybe, there’s 2 somewhere.

This code doesnt work. You want actions to initiate when hitting space while the timer higher than 0.6 secs. But the first thing it does is reset the timer, so all the actions under will not commence.

I just ran the debugger and 0 instances of splitplayer are showing. The events when space key is pressed aren’t runninng at all.

EDIT: when i remove the attract and just make it flat out delete the splitplayer it works…

Here is a screen shot of all my code:

Have you tried just assigning another key (temporarily), adding the Split Player to your scene, and when the key pressed, trigger your attract action? Maybe there is some problem with that extension since I am taking it the events are working when you removed the attract action?

Rearranging events like this works (i can press space to split and unsplit) , but i want the splitplayer (instead of instantaneously snapping back to the player) to actually visibly move to the player

so if i add a splitplayer instance, it works as expected (using a force, no attract) but if i remove it then i cant even split it in the first place

ok i fixed it! it was because technically when i summon the instance it is touching player on the edge so summoned it at player x - 5 and it worked