i have read throught this script and all i can find that might be wrong is the word script. Btw my script is meant to make a counter go up 1 every time a click a button i made in my game it always the word script in red and in the output it says
well, as i am new to scripting i tried putting other words at the end to see if they worked but they didnt. I obviously checked if it worked without any words at the end too
The connected function looks inconsistent. One of them is script.Parent.Parent.ScreenGui2.Frame2.counter.Text
The other is script.Parent.Parent.Frame.screenGui2.Frame2.counter.Text
local buttonstart = script.Parent.Frame.ImageButton
local counter = script.Parent.Parent.ScreenGui2.Frame2.counter
local function onButtonActivated()
counter.Text = tonumber(counter.Text) + 1
end
buttonstart.Activated:Connect(onButtonActivated)
You put :Activated instead of .Activated, and I just made it neater.