Going insane with Roblox gsub please help

I have no idea how you’d even come close to resolving this, honestly. You should try and hit up bug reports for this instance.

brother i have the slightest idea of how to even describe this bug let alone make a report about it

btw after this post i uninstalled studio and installed it again with a new studio installer download and same error lol

Actually we might be able to do this. Try this.

local function HackyReturnLeftOfString(target, splitter)
	return target:sub(select(2, string.find(target, splitter)) :: number + 1)
end

function module.getNodePath(node: node)
	local nodeName = node.Name
	local nodePath = node:GetFullName()
	
	local replacementLimit = #(string.split(nodePath, ".")) - (2 + if string.sub(nodePath,1,1) == "." or string.sub(nodePath,-1,-1) == "." then 1 else 0)
	local replacedNodePath = string.gsub(nodePath, '%p', '/', replacementLimit)
	local rootSplit = HackyReturnLeftOfString(replacedNodePath, 'root')
	
	print(rootSplit) -- Replace this with result, let me know if it works.

	print(nodePath) --Players.Lozarth.PlayerGui.OS.root.home.shroomjak.example.lua

	local splitAfterRoot = string.split(nodePath, 'root')[2]

	print(splitAfterRoot) --.home.shroomjak.example.lua

	local splitBeforeNodeName = string.split(splitAfterRoot, nodeName)[1]

	print(splitBeforeNodeName) --.home.shroomjak.

	local replacePeriods = string.gsub(splitBeforeNodeName, '%p', '/')

	print(replacePeriods) -- NOTHING

	local path = replacePeriods .. nodeName 

	print(path) --example.lua

	return path
end

Edit: for reference, it works here:

print(#replicatePeriods)



93f67f6287ae169d0675bfa229228981

It says the length is 16 which lines up with /home/shroomjak/ having 16 characters, but it is not visible in my F9 console

Have you tried looking at the output window instead?

buddy, if it doesn’t show in your console, it doesn’t matter lmao. just continue to use it for your linux game thingy

Chances are this is also not showing in his intended labels, such as for a file explorer.

Unfortunately, I’m unsure how to fix this, it’s such a niche and confusing bug, any more thought on it might break me honestly.

oh. my. god.


THANKS GUYS! turns out my code was fine, the f9 console is just TERRIBLE! in my fit of rage upon discovering this i accidentally popped a blister on my torso which i recieved from an oil burn OH GOD IT HURTS SO BAD

1 Like

it says that the text length is 16, exactly as he wanted. so it’s probably just a hidden easter egg in the f9 console :slight_smile:

Lord almighty :skull:

That took far longer than necessary.

I found information!

The console does not show any string using forward slashes! This is a bug that has to be addressed.

Yeah, forward this to bug reports please! This is very painful to the context of this discussion!

1 Like

Sadly, I’m unable to create a new topic to Bug Reports, so this bug might linger for a while.

But, it is always recommended to use the output window instead!

1 Like

there is a bug report group if you opted in.

I will forward this to an administrator in DMs, let them know, and perhaps get a bug report set up.

You can request access if you join the bug reports group.

1 Like

thank you so much guys i will make sure to NEVER EVER touch the F9 console again

1 Like