Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Local Transparency Modifier Not Changing Character?

Asked by 8 years ago

The Goal of this script is to make a players arms and gun visible while they are locked into first person mode. The problem is that it does nothing, and gives no errors. Any Ideas? THANKS!

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
 local humanoid = char:WaitForChild("Humanoid") -- waits for the humanoid in the character



function Visible(part)
    if part and part:IsA("BasePart") and( part.Name=="Left Arm" or part.Name=="Right Arm" or part.Name=="Aug") then
        part.LocalTransparencyModifier = part.Transparency
        part.Changed:connect(function (property)    
            part.LocalTransparencyModifier = part.Transparency
        end)
    end
end

for _,v in pairs(char:GetChildren()) do
    Visible(v)
end

1 answer

Log in to vote
0
Answered by 8 years ago

I think this is actually a thing on the camera. Because the players arms are already solid and everything, just the camera makes it invisible.

A good example of this is to slowly zoom in your camera in game.

So if anything you would actually have to make a camera that locks your camera to stay either "Attach" or "Scriptable" and CFrame it to the tiny brick in your tool you could call "CamBrick" or something around those lines.

If you don't know how to make a custom camera script I have a place thats free to take(Uncopylocked) that shows the basics of how to make a custom camera. Like any other code it can be changed to something entirely different. I'll link the place at the bottom of this post.

If you have any other questions feel free to ask me!

- Cheers, CommanderSkywalkerTR

[LINK TO PLACE]:

https://www.roblox.com/games/556922203/Camera-Test

Ad

Answer this question