22,934 questions
Score of 0
0 answers
88 views
Why does my code run into walls when the pathfinding code detects them and routes my code around it?
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local PathfindingService = game:GetService("PathfindingService")
local NPC = ...
Score of -4
0 answers
183 views
For loop is happening instantly
My current goal is as follows: I wish to make a player that is able to "jump" such as in a platformer game like Super Mario Bros. I have this pico-8 code:
-- player
player={}
function player....
Score of 0
0 answers
47 views
UserInputService firing twice after the player respawns
I’ve got this connection that allows the player to interact with objects in the world:
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
local objeto = nil
...
Advice
1
vote
2
replies
144
views
Transitioning to Roblox studio language(Luau) from Python/C++
I am an experienced programmer(primarily coming from C++, Python, JS and PHP) moving into Roblox game development. I want to build clean, maintainable systems using Luau but want to avoid the classic ...
Score of 2
2 answers
69 views
How to get information from a Block into an Inline in Pandoc with Lua Filter
I am processing an xhtml file with pandoc. The file contains footnotes which are marked in the body with a link targeting an element that is not in the body.
In the AST, the footnotes are contained ...
Advice
0
votes
3
replies
114
views
How do I make my Neovim open specific file instead of splash screen when I execute "nvim" in my shell?
I have a file called "todo", which is basically a text file that stores my todo list. I want to be always reminded of my ongoing task when I open my Neovim. So, when I execute "nvim&...
Best practices
1
vote
2
replies
132
views
How to connect multiple services without creating direct dependencies between them?
(Translated by translator)
I use Roblox Studio for development.
In short, I'm having trouble connecting multiple services. For example, when an event is triggered in Service #1, I need Service #2 to ...
Advice
0
votes
1
replies
95
views
Universal Bresenham
I've tried to make the Bresenhams's algorithm for parabola and catenary.
Is is possible to make it for the any function y = f (x), just the universal solution?
I've tried to make something naive, not ...
Score of 1
1 answer
123 views
Load module only if file exists or fallback to {}
local baz = require("foo.bar") or {}
I was hoping something like this would work but then I renamed bar file I got an error.
bar.lua:
local baz = {}
baz.example = true
return baz
main.lua
-...
Score of -1
1 answer
151 views
FiveM: Player distance inaccurate with DrawMarker Scale
I am trying to create a circular zone in a FiveM GTA V server, but I am having issues with distance calculation between two coordinates. The values I calculate never seem to match the radius used in ...
Score of 1
0 answers
166 views
How to implement a 'look-behind' camera in Roblox without breaking character movement?
I'm trying to make a mechanic where a player can look behind themselves (like in Outlast) while still being able to move in the forward direction, not the direction the camera is now facing (i.e. ...
Score of 4
2 answers
175 views
Why does my lua table randomly lose values when iterating?
i'm writing a small utility for a roblox game. it's just server-side lua, not executor stuff. i'm filtering a list of values before using them for spawn logic. i'm trying to remove numbers lower than ...
Score of 1
1 answer
76 views
Cylinder created through Raycast does not face the meant direction
I've got this string of code in a global script fired from a local script which creates a straight line from the origin of the Raycast to the ending of it, essentialy tracing its trajectory accurately:...
Score of 1
1 answer
120 views
How does Neovim populate the runtimepath at launch?
I am trying to upgrade from Neovim version 0.10.0 to 0.12.0. However, the runtimepath is still configured for version 0.10.0. When I run lua print(vim.inspect(vim.api.nvim_list_runtime_paths())) the ...
Score of 5
2 answers
134 views
What is the significance of making a nested function global in Lua?
This is the Lua version of Knuth's "Man/Boy Test". I found that, to reproduce the result shown in the Wikipedia article, I had to declare the nested function "B" "local"....