I am making an inventory system that equips things like particle effects ETC and it works great but one issue is that when the player clicks equip it works but it equipt the particle effect to all players, not just the one that clicked equip Here is my code:
Local Script
local function equipRick()
if RickValue.Value == true then
if purchaseImg.Image == "rbxassetid://13013809023" then
equipEvent:FireServer("Rick", plr.UserId)
end
end
end
local function equipDog()
if dogValue.Value == true then
if purchaseImg.Image == "rbxassetid://13014229857" then
equipEvent:FireServer("Dog", plr.UserId)
end
end
end
local function equipBag()
if moneyBagValue.Value == true then
if purchaseImg.Image == "rbxassetid://13014013620" then
equipEvent:FireServer("Bag", plr.UserId)
end
end
end
Server Script:
local function changeP(plr, value)
if value == "Rick" then
emitter.Texture = "rbxassetid://13013809023"
emitter.Enabled = true
end
if value == "Dog" then
emitter.Texture = "rbxassetid://13014229857"
emitter.Enabled = true
end
if value == "Bag" then
emitter.Texture = "rbxassetid://13014013620"
emitter.Enabled = true
end
end
event.OnServerEvent:Connect(changeP)
You are setting emitter enabled, there is nothing using plr in your server script. I think we would need more context to tell how you want to make this script player-based
When someone equips an effect I want it to show for everybody on the server, not just the local player but I don’t know how to achieve that so I thought I could use a server script.
you get a sender value before the other values, it doesn’t matter how many arguments you send, there is always the sender value first, if you send 1 value, you recieve sender first and than that 1 value. The sender value is always first, then next is what ever values you sent.