DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 21 Nov 2014 06:01 PM |
local mouse = game.Players.LocalPlayer:GetMouse()
function mouseShow() script.Datagui.Frame1.Visible = true script.Datagui.Frame1:TweenPosition(UDim2.new(0,mouse.X+40,0,mouse.Y+15), "Out", "Linear", 0.001) script.Datagui.Frame1.textname.Text = mouse.Target.Parent.Configuration.Name.Name end
function mouseHide() script.Datagui.Frame1.Visible = false script.Datagui.Frame1:TweenPosition(UDim2.new(0,mouse.X+40,0,mouse.Y+15), "Out", "Linear", 0.001) end
mouse.Move:connect(function() if mouse.Target ~= nil and mouse.Target.Parent:FindFirstChild("Configuration") then mouseShow() else mouseHide() end end)
Im trying to go into the target brick parent which is a model then to a config in the model. Once there then to a string value
Model > Brick v ---> Configuration > Name(StringValue) > Name.Value
Error: 18:00:51.650 - String expected 18:00:51.651 - Script 'Players.Player.PlayerGui.DataModel', Line 6 - global mouseShow 18:00:51.652 - Script 'Players.Player.PlayerGui.DataModel', Line 17 18:00:51.653 - Stack End
I have the value in the Name(StrValue) set to brick, I have also tried "Brick"
How can I make this work to where it changes the GUI textbox text to the value of the string in the Name Stringvalue
|
|
|
| Report Abuse |
|
|
| 21 Nov 2014 06:08 PM |
"Configuration.Name.Name" The property called Name will take prescedence over any object that is placed inside of "Configuration". Don't name any of your objects "Name" (the StringValue), and it should work.
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 21 Nov 2014 06:39 PM |
| Configuration:FindFirstChild('Name').Name |
|
|
| Report Abuse |
|