local debounce = false game.ReplicatedStorage.BindableFunctions.MoveWeights.OnInvoke = function() local weight = script.Parent if debounce == true then return end if debounce == false then debounce = true for i = 1,15 do wait() weight:TranslateBy(Vector3.new(0,0.125,0.125)) end for i = 1,15 do wait() weight:TranslateBy(Vector3.new(0,-0.125,-0.125)) end debounce = false end end
so this script is controlled with a bindable function that is connected to a local script but for whatever reason whenever i test it in studio mode it works but whenever i test it in the actual game it doesn't and I cant figure out why? Also there are no errors popping up in the output bar
This is the local script that the above script is connected to:
script.Parent.Equipped:Connect(function(mouse) mouse.Button1Down:Connect(function() game.ReplicatedStorage.BindableFunctions.MoveWeights:Invoke() end) end)
for anyone who might have the same problem like mine, its because i used a bindable function for server-client communication, to fix it, instead of using bindable functions, use remote functions.