|
Nevermind, just noticed the other post. |
|
|
"Workspace" is misspelled. |
|
|
function OnTouched(Picture)
if Picture.Name=="Pic" then
print("You touched the picture!")
Picture:Destroy()
script.Parent:Destroy()
else
print("You touched something!")
end
script.Parent.Handle.Touched:connect(OnTouched)
end
Try that. |
|
|
|
http://wiki.roblox.com/index.php?title=Text_%28Property%29
An example would be,
GUIPathHere.GUITextBoxHere.Text = "Anything" |
|
|
Does the tool contain a "Handle"?. |
|
|
Try using this then,
function OnTouched(Picture)
if Picture.Name=="Pic" then
print("You touched the picture!")
Picture:Destroy()
script.Parent:Destroy()
else
print("You touched something!")
end
end
script.Parent.Handle.Touched:connect(OnTouched) |
|
|
|
The "GUITextBox" could be something such as a "TextBox" or a "TextLabel" or "TextButton", I'll give you an additional link to help you,
http://wiki.roblox.com/index.php?title=Beginner%27s_GUI_Tutorial
|
|
|
Try something such as,
Tab = {}
for Player = 1,#Tab do
if Tab[Player] == VariableHere then
table.remove(Tab,Player)
end
end
|
|
|
Try using,
mouse.Button1Down:connect(onButton1Down) |
|
|
The method chosen depends on the situation and personal choice. |
|
|
Actually, it works with a space also. |
|
|
Could you show us the line of the script?. |
|
|
Check to make sure "mouse" inside of onButton1Down(mouse) isn't returning nil. |
|
|
Use something such as,
print(mouse) inside of the first function. |
|
|
Is this a Tool or a HopperBin?. |
|
|
Alright,
try using the solution I originally posted as it should automatically pass the "mouse" parameters to the function. |
|
|
Show me the modified version. |
|
|
Try this,
bin = script.Parent
shelter = game.ReplicatedStorage.Shelter
amt = bin:FindFirstChild("Amount")
function onButton1Down(mouse)
local model = shelter:clone()
model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.hit.p)
g = model:GetChildren()
for i = 1,#g do
if g[i]:IsA("Part") then
g[i].Anchored = true
amt.Value=amt.Value-1
if amt.Value==0 then
bin:Destroy()
end
end
end
end
bin.Equipped:connect(function(mouse)
local ghost = shelter:clone()
repeat
ghost.Parent = game.Works... |
|
|
Try adding a wait() inside of the repeat loop. |
|
|
|
It's detected as a normal key. |
|
|
Actually, just use something such as,
Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.KeyDown:connect(function(Key)
if Key == " " then
print(Key)
end
end) |
|
|