i want to make client-side tween service before that i must get this value {string = value}
like i want {Brightness = 1} but it probably {“Brightness” = 1}
and this is an error Argument 2 missing or nil
string.replace(TEXT, “\”", “”) might do the job?
Mind showing the code snippet?
clienttween:FireClient(player, game.Lighting.Global, TweenInfo.new(0.5), "Contrast" = 1)
game:WaitForChild("ReplicatedStorage").GlobalLighting.OnClientEvent:Connect(function(object, tweeninfo, properties)
local tween = game.TweenService:Create(object, tweeninfo, {properties})
tween:Play()
end)
Just send the table
clienttween:FireClient(player, game.Lighting.Global, TweenInfo.new(0.5), {Contrast = 1})
game:WaitForChild("ReplicatedStorage").GlobalLighting.OnClientEvent:Connect(function(object, tweeninfo, properties)
local tween = game.TweenService:Create(object, tweeninfo, properties)
tween:Play()
end)
Unable to cast to Dictionary this is error idk how
What is Global?
![]()
wait a minute It’s Argument 2 missing or nil
ColorcorrectionEffect in lighting
string.replace? Is that a new feature?
Also to @NoobyRequiem.
For that you can do:
local property,value = "Brightness",0
local tweengoal = {[property] = value} -- make sure to add brackets around said string.
Still Argument 2 missing or nil on client
Btw it’s not the problem of the Contrast, it’s the tweeninfo’s (and yes i sent the tweeninfo)
You’d have to put in the TweenInfo in the LocalScript to work
So you should probably send the tween time
clienttween:FireClient(player, game.Lighting.Global, 0.5, {Contrast = 1})
game:WaitForChild("ReplicatedStorage").GlobalLighting.OnClientEvent:Connect(function(object, tweenTime, properties)
local tweeninfo = TweenInfo.new(
tweenTime
)
local tween = game.TweenService:Create(object, tweeninfo, properties)
tween:Play()
end)
It’s actually works Thanks you very much!!
Late at night and im used to python xD
I meant to make use of string.gsub, which is effectively just string.replace
Yea you’re not wrong. I wonder why they even named it gsub, makes no sense.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
