I’m working on a Super Smash Bros type platform that lets the player jump up through the bottom and drop down from the top. It works fine save for one major detail.
The player gets onto the platform and the platform is supposed to ensure that the player is standing on it. It then waits for the player to press a key, where the platform will disable collisions and let the player fall through.
I looked for solutions around the devforum and couldn’t find any. I also asked some friends for their thoughts on the code and their solutions didn’t work either.
This is the code snippet that’s causing the problem:
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
print("toucc")
UIS.InputBegan:Connect(function(Input)
print("began input")
if Input.KeyCode == Enum.KeyCode.LeftShift then
print("drop")
It’s executing up to print(“toucc”) and then it doesn’t start detecting input. Is there a special way to do this? It looks to me like it should work fine, what’s going wrong? The output pane isn’t showing any errors, so I think this is a classic case of Manatee Wrote the Code Wrong™
I put it in a localscript and it’s not detecting the player touching it either now. What’s even stranger is that I put it back into a normal script and it didn’t work either… I’ll keep you posted as I try to find this issue before I go back to fixing what I made the post for
Actually I’m using Enum.Keycode, and it has to be the localplayer that presses the key. I’m really new to scripting so I dont even know how asking the server for a key press would even work (forgive me for making silly errors when I say new to scripting I mean really new)
So we have a function that only works on a localscript and another one that won’t work in a localscript? Well that’s a pickle, do you think there’s any way I can link the two scripts together somehow?
Maybe you can do something like putting the touched function inside a server script and when it fires you can have a local script in Server Storage which you can clone to the player’s Gui.
My friend and I are making a Super Smash type game using custom Roblox avatars instead of Nintendo copyright property, because the two of us wanted to try to make a game that Roblox didn’t really have.