|
This idea would be completely possible however I'm hoping the parent's aren't other players. |
|
|
Yes, depending on what the parent is. |
|
|
If you want a random map changing script then
Maps = {game.Lighting.Map1,game.Lighting.Map2,game.Lighting.Map3}
SelectedMap = math.random(1, #Maps)
for c = 10,0, -1 do
Maps[SelectedMap].Parent = game.Workspace
print(Maps[SelectedMap].."Has Been Chosen!")
end
Try this. |
|
|
You need to check if x actually has a parent and if the parent actually has a child named "Humanoid",
if x.Parent and x.Parent:FindFirstChild("Humanoid") then
--Code Here
end |
|
|
Alright, here you go,
Part = Instance.new("Part") --This is a comment. comments do not effect the actual script at all, use them for documentation and such if you want.
--Part = Instance.new("Part") would create a brand new brick named "Part" which is the default name, however we need to assign a Parent to this part so I will use.
Part.Parent = game.Workspace --This will turn the part into a physical 3D object within workspace as a "child" which we can add additional code to interact with.
Part.... |
|
|
Alright
Part = game.Workspace.Part
--We create a variable which now contains the value of a path leading directly to the brick named "Part" in Workspace.
Part.Touched:connect(function(Toucher) if Toucher.Parent and Toucher.Parent:FindFirstChild("Humanoid") then
Player = game.Players:FindFirstChild(Toucher.Parent.Name)
Player.TeamColor = BrickColor.new(TeamColorHere)
end
end)
--We used the .Touched:connect() event to create a brand new function, we then use if statements to check whether the part... |
|
|
RestrictedPlayers = {"PlayerNameHere","PlayerNameHere","PlayerNameHere"}
script.Parent.ClickDetector.MouseClick:connect(function(Clicker)
for _,v in pairs(RestrictedPlayers) do
if Clicker.Name ~= v then
print("You do not have permission")
else
print("You are permission")
end
end
end)
This script assumes that it's parent is the part you intend to use, this script also assumes that the parent contains a "ClickDetector". |
|
|
script.Parent.Touched:connect(function(Toucher)
if Toucher.Parent and Toucher.Parent:FindFirstChild("Humanoid") then
Player = game.Players:FindFirstChild(Toucher.Parent.Name)
end
end)
--This script assumes that it's parent is a "Part" |
|
|
Here's an example
script.Parent.Touched:connect(function(Toucher)
if Toucher.Parent and Toucher.Parent:FindFirstChild("Humanoid") then
Toucher.Parent:MoveTo(Vector3.new(XNumberHere,YNumberHere,ZNumberHere))
end)
This example assumes that the script's Parent is the brick that you want the character to touch to move to the other brick. :MoveTo() moves a "Model" using Vector3. |
|
|
This is an example,
while wait() do
if script.Parent.Text == "TextHere" then
print("Success")
break
end
end
--Assuming the parent is a TextBox or something similiar. |
|
|
I'm sorry, the Parent of the limb was the Character, just remove the "Character" part. |
|
|
By "hierarchy", I'm basically referring to the order of the Parent's and Children, Include the names please. |
|
|
Try this,
function onTouch(hit)
if hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
a = game.Players:FindFirstChild(hit.Parent.Name)
game.ServerStorage["Tool"]:clone().Parent = game.Players.FindFirstChild(hit.Parent.Name.Backpack)
else return false
end
end
|
|
|
function onTouch(hit)
if hit.Parent then
a = game.Players:FindFirstChild(hit.Parent.Name)
game.Lighting["Tool"]:clone().Parent = game.Players.FindFirstChild(hit.Parent.Name).Backpack
end
end
script.Parent.Touched:connect(onTouch)
|
|
|
function onTouch(hit)
if hit.Parent and game.Players:FindFirstChild(hit.Parent.Name) then
a = game.Players:FindFirstChild(hit.Parent.Name)
game.Lighting["Tool"]:clone().Parent = game.Players.FindFirstChild(hit.Parent.Name).Backpack
end
end
script.Parent.Touched:connect(onTouch)
|
|
|
game.Players.ChildAdded:connect(function(player)
player.Chatted:connect(function(chat)
if player.Name == "18lpickett" then
if string.lower(chat) == "load/sf" then
if not game.Workspace:FindFirstChild("SF") then
game.Lighting["SF"]:Clone().Parent = game.Workspace
game.Lighting.LinkedSword:Clone().Parent = Player.Backpack
elseif string.lower(chat) == "end/sf" then
if game.Workspace:FindFirstChild("SF") then
game.Workspace["SF"]:Remove()
end
end
end
end
end)
end)
Could you explain in detail what th... |
|
|
You just need to add another "Parent" to,
Human = script.Parent.Parent |
|
|
game.Players.ChildAdded:connect(function(player)
for _,v in pairs(game.Players:GetPlayers()) do
player.Chatted:connect(function(chat)
if player.Name == "18lpickett" then
if string.lower(chat) == "load/sf" then
if not game.Workspace:FindFirstChild("SF") then
game.Lighting["SF"]:Clone().Parent = game.Workspace
game.Lighting.LinkedSword:Clone().Parent = v.Backpack
elseif string.lower(chat) == "end/sf" then
if game.Workspace:FindFirstChild("SF") then
game.Workspace["SF"]:Remove()
end
end
end
end
end... |
|
|
The final "Parent" is more then likely the player's Backpack. |
|
|
Try looping through the "Parent" and changing the "Parent" of all of the "Children" from there. |
|
|
It appears as though you aren't setting the parent of the "Ball" to Workspace. |
|
|
Did you parent the brick to Workspace?. |
|
|
Try to parent a "Mesh" instance into the limbs of the character/weld a "Part" with the "Mesh" onto the character. |
|
|
There's multiple methods to doing this actually, you could parent the projectile to the Tool that created it and use that to store the Name of the LocalPlayer in a StringValue. |
|
|
game.StarterGui:SetCoreGuiEnabled("All",false)
game.Players.PlayerAdded:connect(function(Player)
script:Clone().Parent = Player
end) |
|