How do I make a football game like FIFA?

I don’t think you’ll find any tutorials on how to make a game like FIFA in here.

The most I can give you at the moment are just verbal references for you to work with.

To start, you said player can control the whole team, for you to be able to do this you’re going to have to get closest players in order to be able to pass off control when a key is clicked, this can be done using magnitude very easily.

You are going to have trouble setting all the remotes that you need to pass on local events to the server and vice versa if you’re a beginner programmer. I would say just practice doing smaller things like learning about magnitudes and stuff so you can get it done one by one. The wiki is very helpful, but if you have any questions you can just ask here.

A test code, which will most likely not work and you’ll have to change is

function ClosestPlayer()
    local rootPart = fakeCharacter:FindFirstChild("HumanoidRootPart")
    local newCharacter

    for i,v in pairs(fakeCharacter) do
        if v ~= currentCharacter and v:FindFirstChild("HumanoidRootPart") then
            local targetCharacter = v.HumanoidRootPart
            local magnitude = (currentCharacter.HumanoidRootPart.Position - targetCharacter.Position).magnitude

            if magnitude < distanceYouWant or the other characters then
                newCharacter = v
            end
        end
    end
    return newCharacter
end

Please keep in mind this is more of a pseudocode and an example you can use.

Good luck!

If you want, you can refer to other devforum posts which can help you.

How do I find the nearest player from a block? - Help and Feedback / Scripting Support - DevForum | Roblox

3 Likes