Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

IntValue.Value is showing values as 0?

I've been working on a directional swing system for a melee-based combat game.

Each player has MouseHorizontal and MouseVertical IntValues in which are always -1, 0, or 1, corresponding to the previous movement of their mouse.

The IntValues are being set perfectly, however, I'm currently trying to access these values through the weapons script. As you can see in this screenshot, the IntValue on the right shows as 1, however, the print from the weapon script shows 0.

I'm currently stuck here. Any help would be greatly appreciated.

https://ibb.co/GMC2Nnp

2 comments

0

it will be good to show some code, maybe something is changing value

0

I thought that would be the case, but I just did a check and the values are only being changed by the script that checks for mouse movement.

1 answer

✓ Accepted answer

You're forgetting that any changes done on the client will not be replicated to the server unless there is a bridge formed via RemoteEvents or RemoteFunctions. Respect filtering enabled.

4 comments

0

*most, not any.

0

I shall never respect filtering enabled cuz it broke my games in like....... 2016

0

no one can play your game now.

0

other than friends

This discussion is preserved as it was. New answers, comments, and votes are closed.