I made a dialogue shop but in FE the tools dont give to the players backpack when they 30 ROBUX FOR WHOEVER SOLVES! This works in studio but not server the game is FE
I think when they buy the item from the dialogue it should fire a RE in rep storage and then a server script service script should respond to it and get the player as a parameter and then give the player the tool?
Code ((code also provided below) but recommended to check img)
script.Parent.DialogChoiceSelected:connect(function(player, choice) if choice == script.Parent.DialogChoice.Sword.Yes then game.ReplicatedStorage.RemoteEvent:FireServer() end end)
Code that recieves the remoteveentfireserver ((also below))
game.ReplicatedStorage.RemoteEvent.OnServerEvent:connect(function(player) game.Lighting.Sword:Clone().Parent = player.Backpack game.Lighting.Sword:Clone().Parent = player.StarterGear local gui = game.Lighting.Success:Clone() gui.Parent = player.PlayerGui gui.Script.Disabled = false end)
send the script so i can get more info, but what might be the problem is if your LocalScript is trying to Instance.new
or change the property of a part (or something in the Workspace).
I don't believe if it has something to do with the scripts, so, DO NOT GIVE YOUR SCRIPTS TO THESE SCRIPT-THIRST newbies, they just want your script.
Here is a method that i learned from this site.
RemoteEvent
local event = Instance.new("RemoteEvent", game:GetService("ReplicatedStorage")) event.Name = "Ready"
These lines, make a RemoteEvent inside ReplicatedStorage, and names it to "Ready".
Now, all you have to do is creating a function, and telling the function what you want it to do.
After that... FIRE THE SERVER !
("Note : Put those inside your script, but do not really paste your script, i'm sure a RemoteEvent can do the job. ") ("For more help, click HERE ")