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

How do I create a instance that is below my humanoid?

Asked by
zle_n 9
5 years ago
game:GetService("Players").PlayerAdded:connect(function(Player)
    Player.Chatted:connect(function(Message)
        if Message == "joe mama" then
            game.Workspace.Sounds.TP:Play()
            local Gate = Instance.new("Part",game.Workspace)
            local Humanoid = Player.Character.HumanoidRootPart -- this probably has something to do with it
            Gate.Anchored = true
            Gate.Material = Enum.Material.Neon
            Gate.BrickColor = BrickColor.new("Institutional white")
            Gate.Position = Humanoid.Position -- how do i make this be below the humanoid
            Gate.Shape = Enum.PartType.Cylinder
            Gate.Size = Vector3.new(0.05, 8.8, 5.39)
            Gate.Orientation = Vector3.new(0, 0, -90)
        end
    end)
end)
0
example of what i need zle_n 9 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Try this.

game:GetService("Players").PlayerAdded:connect(function(Player)
    Player.Chatted:connect(function(Message)
        if Message == "joe mama" then
            game.Workspace.Sounds.TP:Play()
            local Gate = Instance.new("Part",game.Workspace)
            local Humanoid = Player.Character.HumanoidRootPart -- this probably has something to do with it
            Gate.Anchored = true
            Gate.Material = Enum.Material.Neon
            Gate.BrickColor = BrickColor.new("Institutional white")
            Gate.CFrame = Humanoid.CFrame + Vector3.new(0, 3, 0)
            Gate.Shape = Enum.PartType.Cylinder
            Gate.Size = Vector3.new(0.05, 8.8, 5.39)
            Gate.Orientation = Vector3.new(0, 0, -90)
        end
    end)
end)
Ad

Answer this question