Hello developers! So I want to make an atribute that will get set to true or false in a local script, but when checking for that atribute in another script, like a server side one it is showing nil when the atribute should be true or false.
This is the server side:
if char:GetAttribute(Dashing) then return end
print(char:GetAttribute(Dashing))
This is the local side and also the place where the atribute is being set:
dashing = char:SetAttribute("Dashing", true)
NOTE that the scripts are much bigger but I showed you just the relevant parts
If the attribute is being applied on the client (in a LocalScript), it won’t replicate to the server, so a normal Script won’t be able to see the attribute applied to the character model. This is a consequence of ROBLOX’s networking model (the majority of changes made on one player’s client do not, on their own, replicate to other clients nor the server).
This would be why the attribute is nil on the server. The server can’t even see it. You have to set the attribute on the server for the server to see the change take place.