If statement not working

I have this script as child of a text button in a menu that doubles your multiplier when u buy it but it doesnt work. Is it cause its a server script inside player gui?

function buy ()
	if tokens.Value >= multi.Value * 100 then
		multi.Value = multi.Value * 2
		tokens.Value = tokens.Value - (multi.Value * 100)
	else end
end

I have

script.Parent.Activated:Connect(buy)

so its not the problem.

To do this, you will need to set up a remote event in ReplicatedStorage and fire it from a local script.

i knew it. time for lots of trouble for me. ty

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.