You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I made a script that when you activated the tool the value of the invVaule is supposed to change but it’s not working even tho there is no errors shown when i run it.
Here are the codes:
local book = script.Parent
local iq = book.Value
local function onMouseClick()
local player = game.Players.LocalPlayer
local IQ = iq.Value
IQ = tostring(IQ + 5)
local iqbar = game.StarterGui.ScreenGui.IQ_bar
local text = iqbar.Text
iq.Changed:Connect(function()
text = IQ
end)
print('all stages passed')
local book = script.Parent
local iq = book.Value
local PlayerMouse = game.Players.LocalPlayer:GetMouse()
PlayerMouse.Button1Down:Connect(function()
local Player = game.Players.LocalPlayer
local IQ = iq.Value
IQ = tostring(IQ + 5)
local iqbar = game.StarterGui.ScreenGui.IQ_bar
local text = iqbar.Text
iq.Changed:Connect(function()
text = IQ
end)
end)
print('all stages passed')
for index, Tool in PlrInv do
if Tool:IsA("Tool") then
Tool.Activated:Connect(function()
print(Tool.Name .. "Was activated")
IQ = iq.Value + 0 -- Change this value!
end)
end
end
local Tool = script.Parent
local IntValue = Tool.Value
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
IntValue.Value += 5
end
end)