I keep getting the error 'Something Went Wrong!' Can someone help?

script.Parent.MouseButton1Click:Connect(function()
	local player = game.Players.LocalPlayer
	game:GetService('ReplicatedStorage'):FindFirstChild('LoadingCharacter'):FireServer()
		print("2")
		script.Mouse.StarterCharacter:Clone().Parent = game.StarterPlayer
		if game.StarterPlayer:FindFirstChild('Mouse') then
		print("Finished")
	else
		error("Something Went Wrong!")
	end
	end)

It resets the character. But still the player isnt the character i want it to be.

If you need details, just ask

5 comments

0

Is this a localscript?

0

Yes, It is. I just wanna edit the players character. why?

0

If you want to edit the player's character, why don't you just copy and paste the character into the workspace and set player.Character to that character?

0

Recommend doing that with a serverscript.

0

Oh, I got it working a little while ago. Also. that whole 'Player.Character = char' Doesnt really work for me, i have tried before.