Not_1yo
(Not_1yo)
May 19, 2021, 3:27pm
#1
Trying to make a textbox change a lighting. This time, it’s blur.
local blur = game.Lighting.Blur
local bl = script.Parent.Text
while true do
blur.Size = bl
wait(0.03)
end
edit: it changes the first time but if a player edits the text, it doesn’t change
rSonar
(Kasperr)
May 19, 2021, 3:31pm
#2
Can you elaborate a bit more on what you’re trying to do? So far I’m seeing you try to change the blur size to a string which doesn’t really make sense…
1 Like
Not_1yo
(Not_1yo)
May 19, 2021, 3:33pm
#3
Hope it’s easier.
So a player types in the textbox next to textlabel named “BLUR:” and the text in the textbox is what the size of the blur in lighting is.
what is the blur lightning
1 Like
ZINTICK
(ZILLY)
May 19, 2021, 3:35pm
#5
local blur = game.Lighting.Blur
local blurAmount = script.Parent.Text
while true do
blur.Size = tonumber(bl)
wait(0.03)
end
its a string pretty sure it has to be a number i already stated that @itsXtimes way before u
1 Like
idk what you mean but I think this can work:
local blur = game.Lighting.Blur
local bl = script.Parent
while true do
if tonumber(bl.Text) ~= nil then
blur.Size = tonumber(bl.Text)
end
wait(0.03)
end
1 Like
no I did changes
…
if you just put tonumber without checking it’s nil then it can bring errors
Not_1yo
(Not_1yo)
May 19, 2021, 3:39pm
#8
I tried values. Maybe this isn’t a simple script. Your scripts look like they work but they don’t apparently
ZINTICK
(ZILLY)
May 19, 2021, 3:40pm
#9
whos script is not working???
Not_1yo
(Not_1yo)
May 19, 2021, 3:41pm
#10
my script and its a blur changing gui. (player type number, number is the size of blur)
rSonar
(Kasperr)
May 19, 2021, 3:43pm
#11
They just wrote a possible solution to your code… try them.
1 Like
ZINTICK
(ZILLY)
May 19, 2021, 3:44pm
#12
local blur = instance.new("Blur", workspace.Currentcamera)
local bl = script.Parent
while true do
if tonumber(bl.Text) ~= nil then
blur.Size = tonumber(bl.Text)
end
wait(0.03)
end
is this in a server script or local script?
1 Like
Not_1yo
(Not_1yo)
May 19, 2021, 3:45pm
#13
oh no… I forgot about local scripts. time to try it out xD
1 Like
rSonar
(Kasperr)
May 19, 2021, 3:45pm
#14
Yeah use localscripts for GUI’s.
2 Likes
Not_1yo
(Not_1yo)
May 19, 2021, 3:46pm
#15
Okay time to mark somebody as solution and that means the first script i find that works
1 Like