Hi There! Is there anybody know how to make chat animation?
That plays every time when player wrote any random message in the chat
Thanks
Hi There! Is there anybody know how to make chat animation?
That plays every time when player wrote any random message in the chat
Thanks
What do you mean by “chat animation”? Like a typewriter effect for the messages?
I mean character plays the animation
when he wrote something in chat
If you know how to play an animation, you can write that script and then connect a Chatted event to that. For example:
local plrs = game:GetService("Players")
plrs.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg == "/anim play" then
-- do anim
end
end)
end)
I already have the same script
Then what are you asking for? If you don’t know how to do animations, read these:
I mean the animation should play after every chat message
In that case, you just remove the “if” statement:
local plrs = game:GetService("Players")
plrs.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
-- do anim
end)
end)
local plrs = game:GetService(“Players”)
plrs.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
local anim = Instance.new(“Animation”)
anim.AnimationId = “rbxassetid://7330128544”
end)
end)
Is there anything right?
I am just newbie
And where i need to put this script btw?
ServerScriptService in a ServerScript.
You have to load the animation to the humanoid, then you can play it @Scpecific
local plrs = game:GetService("Players")
plrs.PlayerAdded:Connect(function(plr)
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid") -- Gets the humanoid required to load the animation on
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://7330128544"
local myAnimation = humanoid:LoadAnimation(anim) -- Loads the animation (it can only be used after doing this)
plr.Chatted:Connect(function(msg)
myAnimation:Play() -- Plays the animation
end)
end)
I don’t know why but this is not working
do exactly what @solys_ui Said but put it in a local script in StarterPlayerScripts! Then It Should Work!
I put it in StarterPlayerScripts but this is still don’t work
Try it out now after I made some edits to specifically work with your game @Scpecific
Sorry, but this is still not working
Where this script should be btw?
Because tried to put this in StarterCharacterScript and in StarterPlayerScript
Server Script inside Server Script Service