oadeep
(oadeep)
1
i am trying to update a value with a bindeable event but i dont know how to do it
trying to make it simillar to
game.ReplicatedStorage.Values.OnServerEvent:Connect(function(plr,object,value)
object.Value = value
end)
but i cant update an object with.Value or smt like that while using a bindeable event
searched in the forums but theres nothing simillar to my problem
heres whgat happens when i do this
game.ReplicatedStorage.ValuesB.Event:Connect(function(plr,object,value)
object.Value = value
end)
removing .Value makes it do nothing
unlike remoteevents, bindable events dont send the player as an argument so you need to do it yourself like:
game.ReplicatedStorage.ValuesB:Fire(player, object, value)
where you fire the event
oadeep
(oadeep)
3
this is what i do but the script still doesnt update the values
script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
local count = plr:WaitForChild("timer").count.Value
if count >= 1 then
print("nope")
wait()
else
local count = plr:WaitForChild("timer").count.Value
count += 14400
game.ReplicatedStorage.ValuesB.Fire(plr.timer.count, count)
end)
replace
game.ReplicatedStorage.ValuesB.Fire(plr.timer.count, count)
with
game.ReplicatedStorage.ValuesB.Fire(plr, plr.timer.count, count)
system
(system)
Closed
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.