Hello, I need to make function run when a number value (inside of ReplicatedStorage) changes. The script is running and the number value is changing but the function simply won’t run. I have tried searching on the dev forum and I even went to page two of my google search (ikr) but still couldn’t find anything that worked. It is probably a minor mistake but I cannot see it. There are no errors in the output. Here is the code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local killStreak = ReplicatedStorage:WaitForChild("KillStreak")
local timer = tick()
local speedBoostTime = 8 -- change this value to say how long the speedboost should last.
local speedBoostSpeed = 25 -- change this value to say how fast the play should run when the speedboost activates.
local function multipleChecker(value)
print("Maybe if I play the game enough it might work....")
end
killStreak.Changed:Connect(multipleChecker)
Is this a Localscript or a regular script? If this is a regular script, are you changing the value from a localscript? If so, then that’s likely what’s going on if you’re saying the value is changing, because local changes don’t replicate to the server
I only used a regular script, nothing else
Oh thanks, I am changing it from a local script. Thanks for pointing this out to me. I though the replicated storage was a place where the client would replicate to the server. Once again thanks for telling me this. I will go and use a server script and see if it solves the issue.
EDIT: Yes it worked 
It should solve the issue of replication, but if you require that the action of changing the value happens from a localscript, such as making it change from User Input, you’d need to learn about RemoteEvents to help with that,
but if you don’t require that the action of changing the value happens locally and would still work the same if you use a Regular script, then pay no mind to what I said for now
1 Like
I don’t require that but still thanks for telling. Your help is greatly appreciated.