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

I want to make script for tool when equipped disables some scripts in StarterCharacterScripts?

Asked by 1 year ago

local Tool = script.Parent local Start = game.StarterGui local found = game.StarterPlayer.StarterCharacterScripts("Punch")

function onEquippedLocal() Start:FindFirstChild("ShiftToSprint").Disabled = true end function onUnequippedLocal() Start:FindFirstChild("ShiftToSprint").Disabled = false end

Tool.Equipped:connect(onEquippedLocal) Tool.Unequipped:connect(onUnequippedLocal)

1 answer

Log in to vote
Answered by 1 year ago

if you want them to function for the player with the tool, you'd have to disable the scripts inside the player. all scripts in StarterCharacterScripts spawn inside each player; disabling them from the folder itself does nothing to the player besides disable them after every respawn.


Answer this question