I've been stumped for hours now, I've tried using remote events but It changes a value for everyone. The value is located inside of the player's character, I want it so when I click the gui button it'll change the value. How would I go about doing this?
GUI Script
local ReplicatedStorage = game:GetService("ReplicatedStorage") local plr = game.Players.LocalPlayer local Eventt = plr.Character.PBUEVENT local btn = script.Parent btn.MouseButton1Click:Connect(function(plr) print("Clicked") Eventt:FireServer(plr) end)
Server Script
local Event = script.Parent.PBUEVENT Event.OnServerEvent:Connect(function(player) print("Fired") player.Character.Jersey.PlayerEngine.CatchType.Value = "PBU" end)
When you use :FireServer(), you don’t need to put the player instance inside the parameters.
You would need to:
—Server script local event event.OnServerEvent:Connect(function(plr) print(“fired event from client “..plr.Name end) —Local script local button local event button.Activated:Connect(function() event:FireServer() end)