The view model tool is visible, but so is the one only other players are supposed to see.
Just set the transparency of the model’s children to 1 in a LocalScript.
I tried this
local children = Glock:GetChildren()
for i, child in ipairs(children) do
children[i].Transparency = 1
end
In a local script but it was invisible server-side too
Is it a local script? If it is, where is it placed?
It is a local script. It’s in starterGui
uh i dont think that is a good place for that script
Where should it be? I’ve also tried putting it in StarterCharacterScripts
@abde749 It is an ok place for a script, though I would rather put it in StarterPlayerScripts personally.
@AXGAM3RX Have you tried switching from client view to server view? There should be a button that says “Current: Client” at the top when you playtest; Just click it to switch to server view and see if you can see your tool or not.
Ill try moving it to there.
Yes, that is the way I tested it.
Hm, is there any other information that can help us figure what what is going on? What does Glock
reference in your code:
local children = Glock:GetChildren()
Is there any errors in the output?
local Glock = Player.Backpack.Glock
The Output has no errors
can you send a screenshot of the glock in the explorer
Assuming Glock is a Tool itself, then place this in a LocalScript inside of the Tool
local Glock = script.Parent
for x, y in pairs(Glock:GetChildren()) do
if y:IsA("Part") or y:IsA("MeshPart") then
y.Transparency = 1
end
end
I’m currently on mobile, so I have not tested this, but 99% sure it should work!
@AXGAM3RX i see you have 2 clocks. This means you have to make the fake glock thing model not visible for the player, but also make the view model not visible to the server because then the server will see 2 guns
The server only sees one. The view model is only seen by the client.
Roblox studio keeps crashing whenever I test for some reason. Ill try to test it when I fix it. Thanks!
Instead of setting the Transparency to 1 Try setting the LocalTransparencyModifier to 1
ie instead of :
children[i].Transparency = 1
try using :
children[i].LocalTransparencyModifier = 1
Also make sure that it is a Part, MeshPart or a UnionOperation
This is the most efficient method by far.
for _, part in ipairs(glock:GetDescendants()) do
if part:IsA("BasePart") then
part.LocalTransparencyModifier = 1
end
end
All of the solutions you guys mentioned still don’t show the weapon on the server side. I tried team testing with a friend just in case and they still didn’t work