The script is a fighting game tool that requires keystrokes. Some moves still work, although not perfectly. What is the concept of converting a script to FE?
COMMUNITY QUESTION
What is the process of converting a script to FE?
1 answer
game.ReplicatedStorage:WaitForChild("AttackEvent")
game:GetService("InputService").InputBegan:Connect(function(Pressed, IsChatting)
if Pressed.KeyCode = Enum.KeyCode.R and not IsChatting then
game.ReplicatedStorage.AttackEvent:FireServer()
end
end)
Local Script ^
local AttackEvent = Instance.new("RemoteEvent")
AttackEvent.Parent = game.ReplicatedStorage
local Animations = {241421241, 1245325252} -- random numbers but you will put actual animation ids in there
game.ReplicatedStorage.AttackEvent.OnServerEvent:Connect(function(Player)
local Humanoid = Player.Character.Humanoid
local PlayedAnimation = Humanoid:LoadAnimation("rbxassetid://"..Animations[math.random(1, #Animations])
PlayedAnimation:Play()
end)
ServerScript^
This discussion is preserved as it was. New answers, comments, and votes are closed.
