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 » Scripting Helpers
Home Search
 

Re: Help me rewrite this script!

Previous Thread :: Next Thread 
iMalfunction is not online. iMalfunction
Joined: 14 Aug 2011
Total Posts: 21256
01 Oct 2014 09:05 PM
function onClicked()
script.Disabled = true
msg = Instance.new("Message", Workspace)
msg.Text = "Message Here"
wait(5)
msg:remove()
wait(1)
script.Disabled = false
end

script.Parent.MouseButton1Down:connect(onClicked)

Uh it displays it to the whole server

how do I fix this?
Report Abuse
drager980 is not online. drager980
Joined: 25 May 2009
Total Posts: 13385
01 Oct 2014 09:06 PM
local player = game.Players.LocalPlayer
function onClicked()
script.Disabled = true
msg = Instance.new("Message", player.PlayerGui) -- was displaying publicly on workspace
msg.Text = "Message Here"
wait(5)
msg:remove()
wait(1)
script.Disabled = false
end

script.Parent.MouseButton1Down:connect(onClicked)
test that out
if the script this is in is a local script get rid of local at the top
Report Abuse
iMalfunction is not online. iMalfunction
Joined: 14 Aug 2011
Total Posts: 21256
01 Oct 2014 09:08 PM
k ima test it
Report Abuse
iMalfunction is not online. iMalfunction
Joined: 14 Aug 2011
Total Posts: 21256
01 Oct 2014 09:11 PM
The message doesn't even pop up...

Can you try something else I am all out of ideas...
Report Abuse
drager980 is not online. drager980
Joined: 25 May 2009
Total Posts: 13385
01 Oct 2014 09:18 PM
ok is the script that its in have a little dude in the icon (localscript or normal script)
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
01 Oct 2014 09:20 PM
This only works online btw, try if you tried solo instead.
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
01 Oct 2014 09:28 PM
Drager script requires it to be a local script
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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