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

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

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

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.

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