How to solve this? ''Morph Buy''

so i made a Morph Shop. where every player buys a morph then the Character will change the player’s character. according to the morph that i made:

but I have a problem, where if player1 buys a character morph, players2 who do not buy a character morph will be able to Equip the character from the morph, because players2 do not buy morph. But player1 gets the Equipped morph character because, player1 has bought it, it should be player1 who gets Equipped not player2 because player2 does not buy it,

so how do i solve this???
Video:

Script

local CashValue = script.Parent.Parent.CashValue.Value
local pros = script.Parent.BuyCash
local proMorph = script.Parent.ProximityPrompt

pros.Triggered:Connect(function(player)
	local Cash = player.leaderstats.Cash
	if Cash.Value >= CashValue then
		Cash.Value -= CashValue
		pros.Enabled = false
		proMorph.Enabled = true
	end
end)
ck

image

1 Like

Use only 1 proximity prompt and when the player triggers that check if they have bought the morph. If they bought it you can then proceed to give them the morph, if not check if they can afford it.

The problem you’re facing is that you’re enabling the other proximity prompt on the server so all players will be able to use it.

1 Like

Thank you, your suggestion worked, I have tried it and it worked :grin: :smile:

1 Like

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