You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
I want to use a viewmodel, I’ve parented it to the camera.
What is the issue?
The viewmodel is pushing the character, I assume you’ve seen a similiar topic like this before.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes, I did. First I disabled collisiongroups myself. Then I searched on the devforum for any similiar questions. Found a similiar topic, the solution was literally the thing I did myself.
Just in case I did something wrong, here’s a screenshot:
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Cam = workspace.CurrentCamera
local ViewModel = game.ReplicatedStorage:WaitForChild("ViewModel"):Clone()
ViewModel.Parent = Cam
local Player = game.Players.LocalPlayer
local Character = script.Parent
local Camera = workspace.CurrentCamera
local RunService = game:GetService("RunService")
local ViewModel = game.ReplicatedStorage.ViewModel:Clone()
ViewModel.Parent = Camera
RunService.RenderStepped:Connect(function()
if Player.Character.Humanoid.Health == 0 then
if Camera:FindFirstChild("ViewModel") ~= nil then
Camera.ViewModel:Destroy()
end
end
if Camera:FindFirstChild("ViewModel") ~= nil then
Camera.ViewModel:SetPrimaryPartCFrame(Camera.CFrame * CFrame.new(.025, -1.5, -1))
end
end)
I sorta don’t understand what you mean because my english is bad but, this glitch only occurs once the player is fully zoomed in. In 3rd person they’re fine, I tested that. So if that changes anything?
local Cam = workspace.CurrentCamera
local ViewModel = game.ReplicatedStorage:WaitForChild("ViewModel"):Clone()
ViewModel:WaitForChild("Humanoid").PlatformStand = true
ViewModel.Parent = Cam
local Player = game.Players.LocalPlayer
local Character = script.Parent
local Camera = workspace.CurrentCamera
local RunService = game:GetService("RunService")
local ViewModel = game.ReplicatedStorage.ViewModel:Clone()
ViewModel.Parent = Camera
RunService.RenderStepped:Connect(function()
if Character:WaitForChild("Humanoid").Health == 0 then
if Camera:FindFirstChild("ViewModel") ~= nil then
Camera.ViewModel:Destroy()
end
end
if Camera:FindFirstChild("ViewModel") ~= nil then
Camera.ViewModel:SetPrimaryPartCFrame(Camera.CFrame * CFrame.new(.025, -1.5, -1))
end
end)
Unless I’m meant to enable platformstand without scripting if there is some sort of way? Edit: nevermind I checked the box in properties still has the same issue.
It’s not a module though. I said toolbox because I didn’t want people asking for the viewmodel but someone actually gave it to me. It’s not old. These are all the things it has in it:
I’m sorry guys, I’m not an expert at collisiongroups so this was the issue. However, @DAT_BOI875 one more question I’d like to ask. I just used the collisiongroup property and now it works. But there is this little warning sign here which I don’t understand. Is there a way I can get rid of it?