I Was Wondering How Do I Disable A Single Players Shadows And The Other Players Still Have Shadows, Like Arsenal.
And Is It As Easy As Disabling Shadows In Lighting
Like This:
Shadows Enabled:
Shadows Disabled:
I Was Wondering How Do I Disable A Single Players Shadows And The Other Players Still Have Shadows, Like Arsenal.
And Is It As Easy As Disabling Shadows In Lighting
Like This:
Shadows Enabled:
Shadows Disabled:
You can set the player’s parts’ Transparency to 1 or turn off CastShadows on them.
It’s a bit of a workaround, but yes it’s possible & a bit simple
You could just reference this in a LocalScript
inside StarterCharacterScripts
, thru looping all of the Character’s Objects & checking if they’re a “BasePart” of some sort, then casting its shadow to false:
local Player = game.Players.LocalPlayer
local Character = script.Parent
Player.CharacterAppearanceLoaded:Connect(function()
for _, Part in pairs(Character:GetDescendants()) do
if Part:IsA("BasePart") then
Part.CastShadow = false
end
end
end)
I Edited It For What I Mean About Shadows
I Edited The Post To Show What I Mean About Shadows
Again, loop through everything but instead in the workspace
this time & check if every Part is a “BasePart”
You can reference the script as a LocalScript
parented inside the TextButton
when it gets activated:
local Enabled = true --By default setting
local Button = script.Parent
Button.MouseButton1Down:Connect(function()
if Enabled then
Enabled = false --Changing to false
for _, Part in pairs(workspace:GetDescendants()) do
if Part:IsA("BasePart") then
Part.CastShadow = false
end
end
elseif not Enabled then
Enabled = true --Changing to true
for _, Part in pairs(workspace:GetDescendants()) do
if Part:IsA("BasePart") then
Part.CastShadow = true
end
end
end
end)
Are you trying to disable the shadows using GUIs?
turn off GlobalShadows in a local script
local Button = script.Parent
Button.MouseButton1Down:Connect(function()
game.Lighting.GlobalShadows = not game.Lighting.GlobalShadows
end)
Not that hard tho a very simple script