local Revolver = game.ReplicatedStorage.Revolver.FirstPerson:Clone()
local Camera = workspace.CurrentCamera
Revolver.Parent = Camera
The model is being put in the Camera, but I cannot see it. Shouldn’t it follow the cameras pos?
local Revolver = game.ReplicatedStorage.Revolver.FirstPerson:Clone()
local Camera = workspace.CurrentCamera
Revolver.Parent = Camera
It won’t follow the camera pos, it’s the exact same as parenting it anywhere else (except it won’t be shown to clients if parented on the server, since the camera object isn’t replicated)
If you want it to show on the player’s face/set in the camera you’d have to manually keep setting it’s position relative to the camera with an offset.
Though I just find a viewportframe to work similarly the same.
local View = game.ReplicatedStorage.View:Clone()
View.Parent = workspace.CurrentCamera
game["Run Service"].RenderStepped:Connect(function()
View:SetPrimaryPartCFrame(workspace.CurrentCamera.CFrame)
end)
If I try this tho, it’s in the camera, but I can’t see it.
Does it have a primary part set?
Ye, it’s a central part. I’m basically trying to create like the fake arms in FPS games
Try adding a Vector3 offset to bring it forward a little bit, it’s probably just behind the visible game
I use the tactic of placing items into the current camera in my pickup games where I want things like jewels or coins to only show up for a specific player. This places the burden on the client to handle that memory and does not force players to compete for items in the game. These items do not move with the camera, but remain in the real world position they were placed when they were created. In may case, I place one item in Replicated Storage and clone it into the world at a position.
Another tactic I use in another game is to place those types of items into the HumanoidRootPart for the player. The reason I do this is that in that specific game, the items each have their own animation scripts. Since you can only run scripts in specific places, and the current camera is not one of them, I placed the items in the HumanoidRootPart.
I did discover, that items placed in the HumanoidRootPart are NOT destroyed when the player leaves the game and it causes your Instances to accumulate over time. So I had to specifically delete each item in the player’s HumanoidRootPart when the player leaves the game. When placing items in the current camera, those items are automatically destroyed when the player leaves the game.