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

What is the process of converting a script to FE?

Asked by 4 years ago

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?

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Remote Events

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^

Ad

Answer this question