So I got 2 problems I want so solve:
achieving that the blur effect on lighting will be turn of every time when the character respawns,
displaying the correct dialogue system on each NPC
Problem 1 Code:
game.Players.PlayerAdded:Connect(function(player)
print("PlayerAdded")
player.CharacterAdded:Connect(function()
game.Lighting.Blur.Enabled = false
print("Character Added!")
blurOnValue.Value = false
end)
end)
Once I tested it, it says in the output:
so it’s most likely the code worked but the problem is: The blur won’t turn off
dollychun
(dollychun)
October 6, 2020, 10:05am
#2
DiamondGenius7513:
The blur won’t turn off
I don’t think changing the properties of the Lighting child object will duplicate it to the client.
1 Like
FerbZides
(FerbZides)
October 6, 2020, 10:32am
#3
this is because this only happen when the character was added not an event checking if its really there you could probably see that you have another script checking if the BlurOnValue is true or false for lighting blur maybe thats the issue
1 Like
You’re better off doing something like this
game.Players.PlayerAdded:Connect(function(player)
local blur = Instance.new("Blur")
player.CharacterAdded:Connect(function()
blur:Destroy() -- OR blur.Enabled = false
end)
end)
Edit: The code above should be in a LocalScript
2 Likes
@DiamondGenius7513 If this resolved the problem, please mark this comment as a solution!
I don’t think It did, I just tested it and it didn’t work
Edit: I put the script on the local script
Can you send a picture of your explorer?
Edit: Specifically the lighting area
kylerzong
(kylerzong)
October 7, 2020, 9:54am
#8
LocalScript Inside Of StarterPlayer>StarterPlayerScripts
local Player = game.Players.LocalPlayer
local Blur = Instance.new("BlurEffect", game.Lighting)
Blur.Size = 24
Blur.Enabled = true
Player.CharacterAdded:Connect(function()
Blur.Enabled = false
end)
1 Like