|
| 19 Mar 2014 12:49 PM |
So I'm trying to make it like Find the StringValue with the value of something, how would I do that? This is what I got:
found = game.Workspace:FindFirstChild("StringValue") --Im not sure... |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Mar 2014 12:55 PM |
for _, v in pairs(game.Workspace:GetChildren()) do if v.ClassName == "StringValue" then if v.Text = "Put the text from the string you want to find within these quotes" then print(v.Name) end end end
All it does is print the name of the string you're looking for.
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Mar 2014 01:16 PM |
Well now how would I add it to this script: local tool = script.Parent local user tool.Equipped:connect(function(mouse) user = tool.Parent mouse.Button1Down:connect(function() local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit*300) local hit, position = game.Workspace:FindPartOnRay(ray, user) local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") if humanoid then humanoid:AddTo(tool) end local distance = (position - tool.Handle.CFrame.p).magnitude local rayPart = Instance.new("Part", user) rayPart.Name = "RayPart" rayPart.BrickColor = BrickColor.new("Bright red") rayPart.Transparency = 0.5 rayPart.Anchored = true rayPart.CanCollide = false rayPart.TopSurface = Enum.SurfaceType.Smooth rayPart.BottomSurface = Enum.SurfaceType.Smooth rayPart.formFactor = Enum.FormFactor.Custom rayPart.Size = Vector3.new(0.2, 0.2, distance) rayPart.CFrame = CFrame.new(position, tool.Handle.CFrame.p) * CFrame.new(0, 0, -distance/2)
game.Debris:AddItem(rayPart, 0.1) end) end)
|
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 01:23 PM |
I don't know why you would have to find a stringvalue for a raycasting thing.
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
|
| 19 Mar 2014 01:24 PM |
| I'm making a Pokemon game :/ |
|
|
| Report Abuse |
|
|
| |
|