Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I add a morph with a keyboard input?

Asked by 7 years ago
Edited 7 years ago

I want to add a morph with a keyboard input, so what it is supposed to do is to make it that when a player clicks f, he morphs into a giant monster. It is not working for me please help. This is what I already tried:

01Morph = game.ServerStorage.StarterCharacter
02function onKeyPress(actionName, userInputState, inputObject)
03    if userInputState == Enum.UserInputState.Begin then
04        StarterCharacter = Instance.new("Morph",game.StarterPlayer)
05        game.StarterPlayer.StarterPlayerScripts.TitanShift.TitanMusic.TimePosition = 0
06        game.StarterPlayer.StarterPlayerScripts.TitanShift.TitanMusic.Playing = true
07        wait(7)
08        game.StarterPlayer.StarterPlayerScripts.TitanShift.TitanMusic.Playing = false
09 
10 
11    end
12end
13 
14 
15game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.F)

I already have the monster I want the players to morph into in serverstorage. I named it StarterCharacter, but cant make it go into StarterPlayer when I click F. Also the music works fine :D

0
Try welding morths HumanoidRootPart to players and deletuing players parts/accesories except HumanoidRootPart Shadowman670 -4 — 7y

Answer this question