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

How do I make a script to transform when I say "ssj" in game?

Asked by 7 years ago

I was wondering if someone could help me script transformations into a game. I am trying to make a DBZ styled game but anytime I try to script it in to where you say "ssj" it turns on but it doesn't work however, so does anyone know if Lua changed its chat commands? heres the code example:

local p = game.Players.LocalPlayer p.Chatted:connect(function(msg) if msg == "ssj" then print ("message was ssj!") game:GetService("Chat"):Chat(char.Head, string.upper ("curse you..."), 2)

please not that this is just the part I use for trying to get it to work when I say ssj in game. Any ideas as what I am doing wrong?

0
You have not idenfied the character. FiredDusk 1466 — 7y
0
you have to identify specific characters? i thought you could use local if you wanted it to be for everyone Texas_boy60 0 — 7y
0
USE A GOD DAMN CODE BLOCK farrizbb 465 — 7y
0
Code Block please!!! It's really annoying without a code block :/ AstrealDev 728 — 7y

1 answer

Log in to vote
-2
Answered by
Validark 1580 Snack Break Moderation Voter
7 years ago
local ChatService = game:GetService("Chat")
local LocalPlayer = game.Players.LocalPlayer

LocalPlayer.Chatted:Connect(function(Msg)
    if Msg == "ssj" then
        print("message was ssj!")
        ChatService:Chat(LocalPlayer.Character, "CURSE YOU...", 2)      
    end
end)
0
You have not explained this script at all. User#5423 17 — 7y
0
You should've provided an explanation like @kingdom5 said. AstrealDev 728 — 7y
0
I literally just fixed the formatting for him and added "end". Validark 1580 — 7y
Ad

Answer this question