I already tried using a script with _G and all that stuff in it (in server script service), but it didn't work. I'm trying to make it so that after it reaches a certain number (3 in my case), something happens. Like, every time you kill a certain enemy, it goes up by 1, until it reaches 3 and activates the event. I've been trying to figure this out for weeks, but it never works. I've asked this question on multiple places and even contacted roblox, but they were all either mean to me or unhelpful :(.

1 comment

0

Can you be more specific? If you want a global variable within a script, simply don't put "local" as part of it's syntax when defining it. If you need to pass a variable through other scripts, either make an instance (BoolValue, IntValue, etc) and store it in ReplicatedStorage, or pass the variable through to other scripts using RemoteEvents.