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: Need help with this RemoteEvent..

Previous Thread :: Next Thread 
Luxurize is not online. Luxurize
Joined: 31 Mar 2015
Total Posts: 1289
28 Aug 2015 03:39 PM
The Server Script works fine, but the Local Script doesn't seem to do anything.

-- Server Script
MessageEvent = script.LocalScript:FindFirstChild("DisplayMessage");
Model = script.Parent:WaitForChild("Bricks");
ModelBackup = Model:clone();
while true do
wait(10)
Model:remove()
if Model.Parent == nil then
script.Parent.Changed:connect(function(ModelRemoved, FireMessage)
if ModelRemoved then
MessageEvent:FireClient(FireMessage)
end
end)
end
wait(5)
Model = ModelBackup:clone()
Model.Parent = script.Parent
Model:MakeJoints()
end

-- Local Script
PlayerService = game:GetService("Players"):GetChildren()
Message = game.ServerStorage:WaitForChild("CloneGUI");
MessageBackup = Message:clone();
MessageEvent = script:FindFirstChild("DisplayMessage");
Player = PlayerService.LocalPlayer
function onPlayerAdded(player)
return player
end
PlayerService.ChildAdded:connect(onPlayerAdded)
for _,player in pairs(PlayerService:GetChildren()) do
onPlayerAdded(player)
end
function MessageEvent:OnClientEvent()
Message = MessageBackup:clone()
Message.Parent = Player.PlayerGui
wait(5)
Message:remove()
end


“Insane isn't always black or white. We're all pathological, in our own ways.”
Report Abuse
Luxurize is not online. Luxurize
Joined: 31 Mar 2015
Total Posts: 1289
28 Aug 2015 03:46 PM
Hmm, bump.


“Insane isn't always black or white. We're all pathological, in our own ways.”
Report Abuse
Luxurize is not online. Luxurize
Joined: 31 Mar 2015
Total Posts: 1289
28 Aug 2015 03:54 PM
And another bump.


“Insane isn't always black or white. We're all pathological, in our own ways.”
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
28 Aug 2015 03:57 PM
tl;dr
But here's a basic run down

Server goes like, hey local script take THIS arg1 and passes it through the remote event
remoteEvent:FireClient(game.Players.vacha,"arg1")

Local script goes like: oh server ok I see you want me to recieve something and he goes like
remoteEvent.OnClientEvent:connect(function(incomingArguments)--The arguments the server has passed
print(incomingArguments) --> Prints (the argument recieved from the server) "arg1"
end)

so yeah, if I confused me just tell you
while true do the do
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