Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Some problem that i dont know "string expected, got cframe"?

Asked by 5 years ago
Edited 5 years ago

ok so the TestCF is a stringvalue and i need it's value to be the same cframe as The target's HumanoidRootPart but i get this problem https://gyazo.com/fe924b170b66f73fe6df1e69c7e05765.png btw i dont know nothing about string

if MouseTarget ~= nil and MouseTarget.Parent:FindFirstChild("Humanoid") then 
local target = MouseTarget.Parent
local targetstats = game.ReplicatedStorage.PlayersData:FindFirstChild(target.Name)
if targetstats.IsInKamuiDimension.Value == true then return end
local thing = Instance.new("StringValue", targetstats)
thing.Name = "TrueCarry"
targetstats.IsInKamuiDimension.Value = true
targetstats.TestCF.Value =  target.HumanoidRootPart.CFrame
game.Debris:AddItem(thing,1)
print(targetstats.TestCF.Value)
local Particles = Assets.KamuiParticles.Attachment:Clone()
Particles.Parent = Player.Character.HumanoidRootPart
local Particles2 = Assets.KamuiParticles.Attachment:Clone()
Particles2.Parent = target.HumanoidRootPart
local sound3 = Assets.Kamui:Clone()
sound3.Parent = Player.Character.HumanoidRootPart
sound3:Play()
local sound2 = Assets.Kamui:Clone()
sound2.Parent = target.HumanoidRootPart
sound2:Play()
local anim = target.Humanoid:LoadAnimation(Assets.TeleportSelf)
anim:Play()

target.HumanoidRootPart.Anchored = true
wait(.5)
target.HumanoidRootPart.Anchored = true
target.HumanoidRootPart.CFrame = workspace.KamuiDimension.KamuiSpawn.CFrame
wait(.5)
target.HumanoidRootPart.Anchored = false
Particles.ParticleEmitter.Enabled = false
Particles2.ParticleEmitter.Enabled = false
sound3:Stop()
sound2:Stop()
wait(5)
Particles:Destroy()
Particles2:Destroy()
sound2:Destroy()
sound3:Destroy()
--
--Then The second script is the same just that ithe part where it sets target's HumanoidRootPart CFrame to workspace.kamuidimension.Kamuispawn.Cframe then it will set it to targetstats.TestCF.Value

Also TestCF is supposed to be part of players stats, and so i tried using cframe value it worked but It messes up with the data system where it saves all the values so i cant use vector3 value or cframe value

0
I dont understand your confusion. Its telling you the issue, you're trying to assign a CFrame to a string value. DinozCreates 1070 — 5y
0
TestCF must be a StringValue. It needs to be a CFrameValue. Azarth 3141 — 5y
0
If you'd like help fixing the root of the issue show us what you're attempting to do by editting the question. DinozCreates 1070 — 5y
0
The error in the link to the image you posted refers to line 25. Line 25 of the script you posted is a wait. Where is the error? 1waffle1 2908 — 5y
0
What are you on about? You cannot convert a StringValue into a CFrameValue without a function. Plus, a StringValue's value is STRICTLY strings, and a CFrame value is strictly CFrame. What is the issue? Fifkee 2017 — 5y

Answer this question