Focusing camera on objects with a plugin

Recently i have been trying to make a plugin similar to play in studio which is a plugin where you can walk around as your avatar, while still in editing mode.

The problem i have encountered is making the camera focus on the rig, because it is different than how you can do it through playtesting.

I’ve searched the forums and the internet and found nothing.

Any help would be appreciated! Thanks in advance!

My Current Code

Sorry that it’s quite unorganised

local toolbar = plugin:CreateToolbar("Studio Is A Game")
local pluginButton = toolbar:CreateButton(
	"Start",
	"Studio is a game",
	"rbxassetid://0") 
pluginButton.Click:Connect(function()
	local StudioService = game:GetService("StudioService")
	local Players = game:GetService("Players")

	local loggedInUserId = StudioService:GetUserId()
	local AssetFolder = Instance.new("Folder", workspace)
	AssetFolder.Name = "[ DO NOT DELETE ] Studio Is A Game- Assets Folder"
	local CharacterModel = game.Players:CreateHumanoidModelFromUserId(loggedInUserId)
	CharacterModel.Parent = AssetFolder
end)

Edit: I’m starting to think this is impossible- Any help is appreiciated =D

You could just look through the code of the plugin you mentioned and see how they did it.
I’m 99% sure they just forked the Roblox CameraModule and made it work for the plugin.

Ahh- I wish but i’m not going to spend $4.99 on a plugin…

I will try editing the playermodule, but i have 0% knowledge about modulescriprs inside plugins…

EDIT: Turns out you can :Clone() the playermodule into the team create player’s playerscripts, then by simply :Require()ing it it works flawlessly :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.