✓ Accepted answer
This script will work with no filtering. Here is a better link that may help explain it in more detail FilteringEnabled
Also we can use StarterCharacterScripts for tasks involving the character as we do not need to check if the character is nil. We just wait for the contents of the character.
Lastly KeyDown is deprecated, the good news is that we have a whole new service that holds all of the users input called UserInputService.
Here is an example local script which goes into the StarterCharacterScripts:-
local humanoid = script.Parent:WaitForChild('Humanoid')
local anim = Instance.new("Animation")
anim.AnimationId = "https://www.roblox.com/item.aspx?id=487738693"
local playAnim = humanoid:LoadAnimation(anim)
local usrInpServ = game:GetService('UserInputService')
local function addFire()
local torso = script.Parent:FindFirstChild('Torso')
if torso then
if not torso:FindFirstChild('fire') then
local fire = Instance.new('Fire', torso)
fire.Name = 'fire'
fire.Heat = 0
fire.Color = Color3.new(255/255, 0, 4/255)
fire.Size = 12
fire.SecondaryColor = Color3.new(255/255, 0, 4/255)
end
end
end
usrInpServ.InputBegan:connect(function(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Z then
playAnim:Play()
addFire()
end
end
end)
To make this work with FE you would simply need to move the add fire function to the server and fire the server to add the fire to the player.
I hope this helps as it is only an example which can be built upon such as removing the fire.
Pleas comment if you do not fully understand how / why this code works but also check the wiki page first.
13 comments
any one
Can you please use code block and what do you mean by power?
ok
there
i mean like and aura or like an blast or shield or somthing like dragonballz and hunter x hunter
You can add fire while the animation is playing as an example.
ok how i do that
I'le do an answer in a bit
Are you using FE?
am not sure
what does FE mean
I would recommend that you do http://wiki.roblox.com/index.php?title=Security#FilteringEnabled
am sorry i just dont get it