#Blur Effect after I touch a part.
160 messages · Page 1 of 1 (latest)
local part = script.Parent
local L = game:WaitForChild(“Lighting”)
local blur = L:WaitForChild(“partBlur”)
part.Touched:Connect(function(player)
blur.Enabled = true
end)
I tried that
but am i supposed to have another part or do I just add the script to the part
@midnight salmon
Script to the part
No.
it did not work
Error?
Workspace.part.Script:2: Expected identifier when parsing expression, got Unicode character U+201c (did you mean '"'?)
this is what I got in the output
@midnight salmon
** You are now Level 1! **
hi
np
local Lighting = game:GetService("Lighting")
local BlurEffect = Lighting.BlurEffect
script.Parent.Touched:Connect(function()
BlurEffect.Blur = 25
end)
** You are now Level 5! **
This is judging it's a local script inside the part.
oh
?
so i just have to add it to the part
Is it a server script?
Do you want the effect to be seen just by the player who touched the part?
who touched the part
by everyone
like if one player touched the part it happenes to everyone
for i, v in pairs(workspace:GetChildren()) do
if v:IsA('Part') or v:IsA('MeshPart') then
v.Touched:Connect(function(hit)
if hit then
if hit.Parent:FindFirstChildOfClass('Humanoid') then
if game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect') and game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect').Enabled == false then
game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect').Enabled = false
elseif game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect') and game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect').Enabled == true then
game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect').Enabled = false
end
end
end
end)
end
end
Put this in server script service
isn’t it supposed to be once touched?
** You are now Level 1! **
this is only for blur
It doesn’t work
I want
when one player touched a part the whole game gets a blur
well i tried it and it does not work for me idk why
same
ohhh
i did false
for 2
wait
for i, v in pairs(workspace:GetChildren()) do
if v:IsA('Part') or v:IsA('MeshPart') then
v.Touched:Connect(function(hit)
if hit then
if hit.Parent:FindFirstChildOfClass('Humanoid') then
if game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect') and game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect').Enabled == false then
game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect').Enabled = true
elseif game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect') and game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect').Enabled == true then
game:GetService('Lighting'):FindFirstChildOfClass('BlurEffect').Enabled = false
end
end
end
end)
end
end
it should work
lol my dumbass
sorry
put it in a server script service
it will only work if it touched a certain part right?
How does it know what part to touch to work?
if its a class of 'part' like if you even rename it it would be work
well the part is a spawn point
** You are now Level 2! **
ok
you have to put it in the lightning
ok
but if u put blur in the lighting
then there’s no point of adding the script
cuz you already got the blur then
oh you wanna create in the script
ye
well do you guys know how to script
nah I just know a little
I am learning
Idk if that will work
wait
this is that
creates blur
and you dont have to put one
wait
local blur = Instance.new('BlurEffect')
for i, v in pairs(workspace:GetChildren()) do
if v:IsA('Part') or v:IsA('MeshPart') then
v.Touched:Connect(function(hit)
if hit then
if hit.Parent:FindFirstChildOfClass('Humanoid') then
local cB = blur:Clone()
cB.Enabled = false
cB.Parent = workspace.Camera
if cB and cB.Enabled == false then
cB.Enabled = true
elseif cB and cB.Enabled == true then
cB:Destroy()
end
end
end
end)
end
end
here
Do i still put it in service script
yes
np
did it work ved?
it still did not work
local blur = Instance.new('BlurEffect')
for i, v in pairs(workspace:GetChildren()) do
if v:IsA('Part') or v:IsA('MeshPart') then
v.Touched:Connect(function(hit)
if hit then
if hit.Parent:FindFirstChildOfClass('Humanoid') then
local cB = blur:Clone()
cB.Enabled = false
cB.Parent = game:GetService('Lightning')
if cB and cB.Enabled == false then
cB.Enabled = true
elseif cB and cB.Enabled == true then
cB:Destroy()
end
end
end
end)
end
end
try this
its says
like
its says
lighting is not a valid name
line 11
Script 'ServerScriptService.Script', Line 11
ohhhh
my bad english
local blur = Instance.new('BlurEffect')
for i, v in pairs(workspace:GetChildren()) do
if v:IsA('Part') or v:IsA('MeshPart') then
v.Touched:Connect(function(hit)
if hit then
if hit.Parent:FindFirstChildOfClass('Humanoid') then
local cB = blur:Clone()
cB.Enabled = false
cB.Parent = game:GetService('Lighting')
if cB and cB.Enabled == false then
cB.Enabled = true
elseif cB and cB.Enabled == true then
cB:Destroy()
end
end
end
end)
end
end
try this
😮
it worked??
W
thanks so much
nice
bro
After so long ong
thanks
you dont know how much your helped
glad to help
did it work after u tocuhed the part
ye
W
should i put it in the game
oh you guys are friend huh
it feels amazing to help people
thanks so much
Bru
when you are coming then we will both put it in