|
| 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 |
|
|
|
| 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 |
|
|
|
| 19 Mar 2016 02:20 PM |
| That piece of code does not work, I'm afraid. |
|
|
| Report Abuse |
|
|