generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Remote Event won't fire client

Previous Thread :: Next Thread 
Spooky_Bot is not online. Spooky_Bot
Joined: 27 Jun 2011
Total Posts: 1041
07 Aug 2017 09:19 AM
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local duplicate = ReplicatedStorage:WaitForChild("duplicate")

script.Parent.MouseButton1Click:connect(function()
duplicate:FireServer()
end)

--localscript (this one works fine)

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local duplicate = ReplicatedStorage:WaitForChild("duplicate")
local PaintingLandscape = workspace.PaintingLandscape
local pasteEvent = game.ReplicatedStorage.paste

local function onClone(player)
local clonepainting = PaintingLandscape:Clone()
clonepainting.Name = "Canvas"
clonepainting.Position = Vector3.new(TAGS)
clonepainting.Parent = game.Workspace
local cloneGUI = player.PlayerGui.Studio.Canvas:Clone()
TAGS = "Painting"
cloneGUI.Parent = game.ReplicatedStorage
cloneGUI.Adornee = clonepainting
pasteEvent:FireAllClients() -- this one doesn't work
end

duplicate.OnServerEvent:connect(onClone)

-- serverscript

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local pasteEvent = ReplicatedStorage:WaitForChild("paste")
local painting = game.ReplicatedStorage.Painting

local function onPaste()
local clone = painting:Clone()
clone.Parent = player.PlayerGui
clone.Adornee = workspace.Canvas
end

pasteEvent.OnClientEvent:Connect(onPaste)

-- paste event local script does not fire and idk why

Why won't the client event fire?


Report Abuse
jonesj627 is not online. jonesj627
Joined: 06 Oct 2010
Total Posts: 1496
07 Aug 2017 09:36 AM
It's OnServerEvent in server scripts
Report Abuse
Spooky_Bot is not online. Spooky_Bot
Joined: 27 Jun 2011
Total Posts: 1041
07 Aug 2017 09:41 AM
i know, that's how i have it.


Report Abuse
Spooky_Bot is not online. Spooky_Bot
Joined: 27 Jun 2011
Total Posts: 1041
07 Aug 2017 09:49 AM
bump


Report Abuse
Spooky_Bot is not online. Spooky_Bot
Joined: 27 Jun 2011
Total Posts: 1041
07 Aug 2017 09:58 AM
bump


Report Abuse
HoudinoAwesomesYT is not online. HoudinoAwesomesYT
Joined: 29 Sep 2016
Total Posts: 15
07 Aug 2017 10:05 AM
your mom is really fat, i hmp her


Report Abuse
Spooky_Bot is not online. Spooky_Bot
Joined: 27 Jun 2011
Total Posts: 1041
07 Aug 2017 10:14 AM
bump


Report Abuse
Spooky_Bot is not online. Spooky_Bot
Joined: 27 Jun 2011
Total Posts: 1041
07 Aug 2017 10:23 AM
a


Report Abuse
Spooky_Bot is not online. Spooky_Bot
Joined: 27 Jun 2011
Total Posts: 1041
07 Aug 2017 11:39 AM
aa


Report Abuse
Exzeption is not online. Exzeption
Joined: 01 Nov 2011
Total Posts: 1312
07 Aug 2017 12:23 PM
i've had problems with AllClients in the past, dunno why. either we're using it wrong or it's broken and you'll just need to loop through all the players
Report Abuse
Spooky_Bot is not online. Spooky_Bot
Joined: 27 Jun 2011
Total Posts: 1041
07 Aug 2017 12:36 PM
it would be hard to loop through the players with what I am trying to do. I need it to be in a local script but idk how.

pasteEvent:FireAllClients(WOULD I NEED TO PUT SOMETHING HERE? IF SO, WHAT.)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image