bool = true local player = game.Players.LocalPlayer local mouse = player:GetMouse() script.Parent.Parent.Parent.Equipped:Connect(function() while bool == true do wait() script.Parent.Text = mouse.Target end end) script.Parent.Parent.Parent.Unequipped:Connect(function() bool = false end)
You can click the blue circle to format the code better but i believe its because of this line
script.Parent.Text = mouse.Target
you are setting a text property which needs to be a string to the entire object you are targetting, maybe you meant to use mouse.Target.Name
local bool = true local player = game.Players.LocalPlayer local mouse = player:GetMouse() script.Parent.Parent.Parent.Equipped:Connect(function() while bool == true do wait() script.Parent.Text = CFrame(mouse.Target.Position) end end) script.Parent.Parent.Parent.Unequipped:Connect(function() bool = false end)
this error meens it expected to get a string but instead got a int.