Sword Damage Booster

Can you show me how I would print it locally please?

In the studio ribbon bar there’s a toggle that you can use while testing to go between client and server.
By default it’s on client when you run.

I cant seem to find it. Can you screenshot it perhaps?

I printed it in the command bar, so here you go.

Screenshot (44)

late reply :upside_down_face:

silly me, i always forget theres a player argument provided as the first argument

You’re getting this error because you index:

which sets the game’s StarterTools. What you would do instead is either set it in the player’s backpack, or in their character if they have it equipped.

if gold.Value >= 100 then
	local Katana = Player.Backpack:FindFirstChild("Katana") or Player.Character:FindFirstChild("Katana") -- Get the katana tool in the player's backpack or if they have it equipped, it will be in the player's character.
        Katana.Damage.Value += 100 -- The += operator is more optimized and easier to use.

	gold.Value = gold.Value - 100
	print("You have boosted your Sword's damage")
else

I hope this helps!

you need to make an event for the button, here is an example:

local button 
local event 
button.MouseButton1Click:Connect(function()
game.ReplicatedStorage:FindFirstChild(event):FireServer()
end)

then move the old script from the button to the event and edit it so that it works