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

How would you clone a weapon from server to the player in FE?

So I have a GUI in the player that when they click, its meant to clone a weapon into the Player. The weapon can't be in ReplicatedStorage for some reason as it breaks and when I try clone it from the client, it can't as it is in FE. The weapon is in Workspace.

This is what I had:

local button = script.Parent
button.MouseButton1Click:Connect(function(Player)
local weaponnew = game.Workspace.Weapon:Clone()
weaponnew.Parent = Player.Backpack
end)

1 answer

✓ Accepted answer

This is done by using RemoteEvents and/or functions. RemoteEvents/Functions are used to communicate with the server from the client (and opposite). You can read more about them here

To do what you want, you have to create a remoteevent in ReplicatedStorage and then get the cleint to send a request to it, and then the server receives this, makes sure they don't have the tool already.

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