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

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

Asked by 2 years 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
0
Answered by 2 years 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.

Ad

Answer this question