Error with :GetPrimaryCFrame()

Ohhhh I see, you aren’t trying to grab the PrimaryPart’s CFrame. Sorry I misread your post.

Also errors aren’t just blue, there are red and yellow ones too.

It has to be coming from some virus/bug or a script.
Edit: (so you have check all models and plugins in your game?)

1 Like

I have checked, and the plugin worked normally everyday, and there weren’t any plugin update. I also checked every model and viruses, but there weren’t any.

1 Like

Try running this script in the command bar, it should list any scripts that use GetPrimaryCFrame or GetPrimaryPartCFrame.

local places = {
	"ServerScriptService",
	"Workspace",
}

for _, place in ipairs(places) do 
	for _, v in pairs(game[place]:GetDescendants()) do
		if v:IsA("LuaSourceContainer") then
			if v.Source:match("GetPrimaryPartCFrame") or v.Source:match("GetPrimaryCFrame") then
				warn(string.format("Script '%s' uses GetPrimaryCFrame/GetPrimaryPartCFrame. Containing place: '%s'", v.Name, place))
			end
		end
	end

end
3 Likes

Nothing was printed. I’m pretty sure that there aren’t any scripts that are using the function.

Does this happen when hitting run or play?

1 Like

When hitting play only, it seems.

Try with

local places = {
	"StarterPlayer",
	"StarterGui",
	"ReplicatedFirst"
}

for _, place in ipairs(places) do 
	for _, v in pairs(game[place]:GetDescendants()) do
		if v:IsA("LuaSourceContainer") then
			if v.Source:match("GetPrimaryPartCFrame") or v.Source:match("GetPrimaryCFrame") then
				warn(string.format("Script '%s' uses GetPrimaryCFrame/GetPrimaryPartCFrame. Containing place: '%s'", v.Name, place))
			end
		end
	end

end
2 Likes

Script ‘BaseCamera’ uses GetPrimaryCFrame/GetPrimaryPartCFrame. Containing place: ‘StarterPlayer’

Isn’t that Roblox Core’s Script?

No, that’s a fork of the camera as the camera scripts are placed there on runtime. So it is probably different from the standard camera script

2 Likes

Thank you so much. So how do I find this “BaseCamera” script?

You can just search in the search bar in the explorer: image

2 Likes

Sorry if this is outside the subject a little bit, but I checked the script and its ancestor is PlayerModule (which is a Roblox Core’s Script), and I didn’t fork this ModuleScript, so isn’t this a Engine Bug?
Does it have anything to do with this, because I’m using it: How to disable player controls with new PlayerScript layout? - #4 by daireb

Is this in studio or when running the game? If it’s in studio then it is not an engine bug as you are using a custom camera script.

1 Like

A custom camera script? I’m afraid I don’t understand, can you please explain further?

If you add a PlayerModule script in studio that script replaces the roblox-made one.

That’s the problem. I don’t have a forked PlayerModule inside my game or any script that might be adding it.

Did you run the script I sent while in run/play mode? You should run it outside play/run mode.

Oh, I’m sorry. If I ran it outside then it doesn’t print anything.
Must be an Engine Bug then.

Seems to be a problem for you only then as I’m not getting any errors when playing in studio.

1 Like

I’ll restart my game. Anyways, thanks for the help!