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
 

Function Script Not Working

Previous Thread :: Next Thread 
EmperorTerminus is not online. EmperorTerminus
Joined: 29 Oct 2011
Total Posts: 34
19 Mar 2016 11:44 AM
I have scripted some lines of code which are meant to show a message on the screen of the player who has touched the door. The code has been inserted in to a local script however it is not working. Here is the code:

function onTouched(part)
local abx = Instance.new("Message")
abx.Parent = game.Workspace
abx.Name = "BaseOfOperationsWelcomeMessage"
abx.Text = "Welcome to the Base Of Operations"
wait(1.5)
abx:Destroy()

end

script.Parent.Touched:connect(onTouched)
Report Abuse
Draco_Studios is not online. Draco_Studios
Joined: 24 Feb 2016
Total Posts: 87
19 Mar 2016 12:00 PM
Regular script please
local stop=false

function onTouched(part) if part.Parent:IsA("Hat") then part=part.Parent end
if game.Players:GetPlayerFromCharacter(part.Parent) and not stop then stop=true
local abx = Instance.new("Message")
abx.Parent = game.Players:GetPlayerFromCharacter(part.Parent).PlayerGui
abx.Name = "BaseOfOperationsWelcomeMessage"
abx.Text = "Welcome to the Base Of Operations"
wait(1.5)
abx:Destroy()
stop=false
end
end

script.Parent.Touched:connect(onTouched)

"Lua is coding. Lua is life" - TheBeastSword
Report Abuse
EmperorTerminus is not online. EmperorTerminus
Joined: 29 Oct 2011
Total Posts: 34
19 Mar 2016 02:20 PM
That piece of code does not work, I'm afraid.
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