local PlayerS = game:GetService('Players')
local plr = PlayerS.LocalPlayer
local ContextActionS = game:GetService('ContextActionService')
local Tool = script.Parent
Tool.Activated:Connect(function()
print("Client Activated")
print("Client Enabled",Tool.Enabled)
print("Client ManualActivationOnly",Tool.ManualActivationOnly)
end)
ContextActionS:BindAction("SetStateEnabled",function(_,State)
if State == Enum.UserInputState.Begin then
Tool:Activate()
end
end,false,Enum.KeyCode.E)
Hi–I just ran your Repro.rbxl and when I clicked on your ManualActivationOnly
(and it turned green) then clicking in world did NOT activate your text output, so the lockout
feature seems to work as intended (I clicked the button again and it turned green
and then the text output resumed again on clicks in world.) I didn’t look at the code because
things seemed to be working properly and didn’t seem to show some of what you observed.
Studio just updated before I ran it–Possibly they already fixed something?
Thank you for your observation; ManualActivationOnly is working fine, I was confused by it’s name and description, however Activated still fires when Enabled is false upon calling Activate
Yeah, I’m not surprised by either; “Manual” could suggest something with the hands eg. a mouse, but
yes it means the opposite. It doesn’t surprise me at all regarding the documentation. Have you checked
to see if it makes a difference if you set/clear the Enabled Property in Server-side Scripts instead of LocalScripts? (Your demo shows that the client-side Enabled changes are not replicated to the server.)
This may be a security feature of sorts, as there are lots of things that have changed to only work to
change state if done server-side.
Yeah, that doesn’t surprise me either–I’ve always treated it as a convenience flag. And Tools typically
create the effect you’re expecting by simply returning at the beginning of the Activated handler if Enabled
is false. I actually prefer it this way (counter to the documentation) as it gives more flexibility in how a
Tool can work. eg. more user feedback during weapon reload.
Hey everyone, I’m bumping this thread because this issue has either re-surfaced or it was never fixed in the first place. I’m attaching both a video and a repro where Tool.Activated and Tool.Deactivated both fire when Enabled=False and ManualActivationOnly=False, and Tool.Deactivated fires when Enabled=False and ManualActivationOnly=True. I also included a gui button with a localscript that calls Tool::Activate (and then ::Deactivate) for the MAO Tool when parented to the local character, which still fires the corresponding events for the tool