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

Dialogue Shop not giving tool in FE?

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?

Image1

Image2

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)

Image of Sword and 'Success' Gui location

4 comments

0

Can you give more information, like the scripts, and maybe a pic of the explorer where everything is located...

0

I agree with Ben... How are we supposed to help you if you didn't give us any scripts or maybe a screenshot of the explorer?

0

I did it

0

connect should have a capital C since connect is depricated. I would put the tools in Server storage since this is coming from the server

2 answers

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).

1 comment

1

Talk in comments, so it doesn't count as an ANSWER * Wink Wink * ;)

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 ")

1 comment

0

I have updated the form

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