Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I'm trying to make a Buy Bullet system, how do I get it to work?

Server Script:

game.ReplicatedStorage.ChangeBullet.OnServerEvent:Connect(function(plr, bullet)
	if game.ServerStorage.BulletTypes:FindFirstChild(bullet) then
		plr.HiddenStats.BulletType.Value = bullet
	end
end)

Local Script:

local plr = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	if not plr.HiddenStats.BulletType.Value == "Default" then
		game.ReplicatedStorage.ChangeBullet:FireServer("Default")
	end
end)

1 answer

Found the problem, silly me! I changed the variable bullet so it wasnt the string anymore.

This discussion is preserved as it was. New answers, comments, and votes are closed.