Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

IntValue.Changed not working through server script?

Asked by 4 years ago

Hello I'm trying to make detection with npcs and they both use server scripts and the npc detecting the other npc is not working because IntValue.Changed is not firing. I am trying to change the value.

local IntValue = OtherNpc.IntValue -- renamed Value to "IntValue"

IntValue.Changed:Connect(function(p) -- Trying to connect to .Changed event
    print("Changed") -- This is NOT firing
end)

There are no errors in the output

THIS IS DONE IN SERVER SCRIPTS!!!!!!

0
You're changing the value locally but you're listening for the event on the server therefore the server doesn't recognise the change User#24403 69 — 4y
0
Have you looked at the intvalue when it's supposed to change, to make sure it actually changes? whenallthepigsfly 541 — 4y
0
@incapaxx how to change value through server? billybobpumpkin 0 — 4y
0
You press play, and then at the top of Roblox Studio it will say “Client”. Click that and it will switch to the server view. Then you can change the value ScrubSadmir 200 — 4y
0
@ScrubSadmir THANK YOU billybobpumpkin 0 — 4y

Answer this question