Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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?

4 comments

0

You have not idenfied the character.

0

you have to identify specific characters? i thought you could use local if you wanted it to be for everyone

0

USE A GOD DAMN CODE BLOCK

0

Code Block please!!! It's really annoying without a code block :/

1 answer

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)

3 comments

0

You have not explained this script at all.

0

You should've provided an explanation like @kingdom5 said.

0

I literally just fixed the formatting for him and added "end".

This discussion is preserved as it was. New answers, comments, and votes are closed.