So what I did was I tried making a SSJ script, the purpose of it is to transform your Roblox Character into this super saiyan with powers. It is suppose to change the Player's Shirt, Pants, and Accessories. Basically everytime I say "SSJ" it is not allowing players to transform. Any advice anyone? (Yes this is a previous one)
001 | jun = script.Parent.Parent |
002 | Stuff = false |
003 | --password |
004 | function ssj() |
005 | if Stuff = = false then |
006 | Stuff = true |
007 | for u, c in pairs (jun.Character:GetChildren()) do |
008 | if c.className = = "Accessory" and c.Name ~ = "Swordpack" and c.Name ~ = "GlassesBlackFrame" then |
009 | c.Handle.Transparency = 1 |
010 | end |
011 | end |
012 | Hair 23 = Instance.new( "Part" ) |
013 | Hair 23. Parent = jun.Character |
014 | Hair 23. Name = "Hair" |
015 | Hair 23. formFactor = "Symmetric" |
We can use the Chatted event of player to fire a function if the message that he sent is that word
First let's setup the event, make sure that you setup a player variable
1 | player.Chatted:connect( function (msg) |
2 |
3 | end ) |
Next let's check that the msg is that keyword and fire the function if it is
1 | player.Chatted:connect( function (msg) |
2 | if msg = = "SSJ" then |
3 | ssh() |
4 | end |
5 | end ) |
Make sure you put this event at the bottom of the script so that the function is already defined