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

The scripts are supposed to add power to my Tool but it does not work, anyone know how to fix this?

Asked by 1 year ago
Edited 1 year ago

"Tool = script.Parent Handle = Tool:WaitForChild("Handle") Hand = game.StarterPack.Hand NewServer = Hand.NewServer Server = Hand.Server StarterPack = game.StarterPack

Tool.Equipped:Connect(function() print("Equipping tool") end)

Tool.Activated:Connect(function() print("Tool Activated") Server.Disabled = true print("Enabled") NewServer.Disabled = false print("Disabled")

Tool.Unequipped:Connect(function() print("unequipped tool") end)

Tool.Deactivated:Connect(function() print("Deactivating tool") end) end)" This is my script what it's supposed to do is switch out the Server script with NewServer the scripts are both the same except I changed the velocity on the NewServer. everything goes good, enabling and disabling bla bla bla the scripts "NewServer, and Server" are supposed to add more power (velocity) into my weapon. I can provide more information if needed and explain this all a little better too if it didn't make any sense. BTW, I am fairly new to scripting.

1 answer

Log in to vote
0
Answered by 1 year ago
Edited 1 year ago

Use code blocks next time tho.

local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle") 
local Hand = game.StarterPack.Hand
local NewServer = Hand.NewServer
local Server = Hand.Server
local StarterPack = game.StarterPack
Tool.Equipped:Connect(function() 
    print("Equipping tool") 
end)
Tool.Activated:Connect(function() 
    print("Tool Activated") 
    Server:Destroy()
    print("Enabled") 
    NewServer.Disabled = false
    print("Disabled")
end)
Tool.Unequipped:Connect(function() 
    print("unequipped tool") 
end)
Tool.Deactivated:Connect(function() 
    print("Deactivating tool") 
end) 

Please reply if anything works or not!

Ad

Answer this question