|
| 10 Aug 2015 10:52 PM |
--THE OUTPUT
20:45:59.378 - Players.Player.PlayerGui.Admin_Panel.Server_Shout.Shout_Server.Script:6: bad argument #3 to 'Parent' (Object expected, got string)
--THE CODE
local PlayersService = game.Players local MyMouse = PlayersService.localPlayer:GetMouse()
MyMouse.KeyDown:connect(function(key) if string.lower(key) == 'e'then game.ServerStorage.Shout.Parent = "StarterGui" wait(5) game.ServerStorage.Shout.Parent = "ServerStorage" end end) print("test")
PositiveDeveloper, Scripting Guru and 3 Year Building Veteran, kiss kiss |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 10 Aug 2015 10:56 PM |
local uis = game:GetService("UserInputService")
uis.InputBegan:connect(function(input, event) if event then return end if input.KeyCode == Enum.KeyCode.E then print("Pressing E") end end)
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2015 10:58 PM |
no its moving the thing from ServerStorage to StarterGui thats failing
PositiveDeveloper, Scripting Guru and 3 Year Building Veteran, kiss kiss |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 10 Aug 2015 11:01 PM |
first of all, I gave you a method that is much better. Secondly, you can access objects in ServerStorage from a local script, thirdly, to change the parent of an object you have to define the actual container
thing.Parent = workspace.Model
thing.Parent = game.ReplicatedStorage
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 10 Aug 2015 11:01 PM |
can't access*
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2015 11:10 PM |
its not a localscript but ok what i have now works, but the whole point doesnt i wanted it to move it to starterGui, and become visible. but it doesnt become visible? im dumb
local PlayersService = game.Players local MyMouse = PlayersService.localPlayer:GetMouse()
MyMouse.KeyDown:connect(function(key) if string.lower(key) == 'e'then game.ServerStorage.Shout.Parent = game.StarterGui wait(5) game.ServerStorage.Shout.Parent = game.ServerStorage end end)
PositiveDeveloper, Scripting Guru and 3 Year Building Veteran, kiss kiss |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2015 11:24 PM |
b1
PositiveDeveloper, Scripting Guru and 3 Year Building Veteran, kiss kiss |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2015 12:54 AM |
| Why don't you just put it in the starter gui?????????? |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2015 12:58 AM |
alright
what might be happening is
you're putting it in the StarterGui, but you only recieve the starterGUI when you respawn.
local players = game.Players:GetChildren()
for i = 1,#players do d1 = game.ServerStorage.Shout:Clone() d1.Parent = players[i] end
wait(5)
for i = 1,#players do d1 = players[i].StarterGui.Shout d1:Destroy() end |
|
|
| Report Abuse |
|
|