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

How to make my character say something while doing a move?

Asked by 8 years ago

I need help with making a game. I have looked at some games and when you press a key, your character says something while doing it. Like in some DragonBall Z games, when they're saying "kamehameha"! Please help me.

2 answers

Log in to vote
0
Answered by 8 years ago

http://wiki.roblox.com/index.php?title=API:Class/Chat/Chat

local player = game.Players.LocalPlayer
repeat wait() until player.Character

game:GetService("Chat"):Chat(player.Character.Head, "Kamehameha!","Red")

This should work!

SugoiSenpaiStrikesAgain

2
Copy and pasted from Roblox wiki -666 rep :L UserOnly20Characters 890 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

This is called the "Chatted event" on roblox. So in a nutshell you say something like ff:me and it will give you a force field. This is how you would do it!

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if (msg == "ff") then -- the message to say 
if player and player.Character then --Checking if the player is alive
ff = Instance.new("Force Field",player.Character) -- Creating the force field.
end)
end)

for more help go to: http://wiki.roblox.com/index.php?title=Chat_commands

Answer this question